From fbe2bc0b3b20b22615472b27030629a738571387 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Fri, 10 Aug 2018 14:37:50 -0400 Subject: [PATCH] Added index and documentation --- README.md | 2 +- .../components/approveandcallgasrelayed.js | 6 ++++++ .../app/components/body-sntcontroller.js | 2 +- test-dapp/app/components/callgasrelayed.js | 5 +++++ test-dapp/app/components/transfersnt.js | 5 +++++ test-dapp/app/index.html | 20 +++++++++++++++++++ test-dapp/embark.json | 1 + 7 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 test-dapp/app/index.html diff --git a/README.md b/README.md index 34eb3e4..6491e92 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ nodemon src/service.js ``` ## Test DApp -To run the test dapp, use `embark run` and then browse `http://localhost:8000/identity.html`. +To run the test dapp, use `embark run` and then browse `http://localhost:8000/index.html`. The gas relayer service needs to be running, and configured correctly to process the transactions. Things to take in account are: the account used in embark, and the contract addresses. diff --git a/test-dapp/app/components/approveandcallgasrelayed.js b/test-dapp/app/components/approveandcallgasrelayed.js index 1a10305..1ef3a9c 100644 --- a/test-dapp/app/components/approveandcallgasrelayed.js +++ b/test-dapp/app/components/approveandcallgasrelayed.js @@ -15,6 +15,7 @@ import TextField from '@material-ui/core/TextField'; import config from '../config'; import web3 from 'Embark/web3'; import {withStyles} from '@material-ui/core/styles'; +import { Typography } from '@material-ui/core'; const styles = theme => ({ root: { width: '100%', @@ -155,6 +156,11 @@ class ApproveAndCallGasRelayed extends Component { render(){ const {classes} = this.props; return
+ + + This functionality is used when a Identity will invoke a contract function that requires a transfer of Tokens + + { this.state.transactionError && } diff --git a/test-dapp/app/components/body-sntcontroller.js b/test-dapp/app/components/body-sntcontroller.js index e608071..adaa5c0 100644 --- a/test-dapp/app/components/body-sntcontroller.js +++ b/test-dapp/app/components/body-sntcontroller.js @@ -94,7 +94,7 @@ class Body extends Component { return - + {tab === 0 && } {tab === 1 && TODO} diff --git a/test-dapp/app/components/callgasrelayed.js b/test-dapp/app/components/callgasrelayed.js index 3be3e9f..fd51d32 100644 --- a/test-dapp/app/components/callgasrelayed.js +++ b/test-dapp/app/components/callgasrelayed.js @@ -157,6 +157,11 @@ class CallGasRelayed extends Component { render(){ const {classes} = this.props; return
+ + + This functionality is used when a Identity will invoke a contract function or transfer ether without paying fees + + { this.state.transactionError && } diff --git a/test-dapp/app/components/transfersnt.js b/test-dapp/app/components/transfersnt.js index df50d4c..5671c4f 100644 --- a/test-dapp/app/components/transfersnt.js +++ b/test-dapp/app/components/transfersnt.js @@ -144,6 +144,11 @@ class TransferSNT extends Component { render(){ const {classes} = this.props; return
+ + + This functionality is used for SNT transfers without paying eth fees + + { this.state.transactionError && } diff --git a/test-dapp/app/index.html b/test-dapp/app/index.html new file mode 100644 index 0000000..a1b8f1d --- /dev/null +++ b/test-dapp/app/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + + +

Gas Relayer Demos

+

The following demos are available:

+ + + + \ No newline at end of file diff --git a/test-dapp/embark.json b/test-dapp/embark.json index d422429..621a8b8 100644 --- a/test-dapp/embark.json +++ b/test-dapp/embark.json @@ -1,6 +1,7 @@ { "contracts": ["contracts/**"], "app": { + "index.html": "app/index.html", "js/identity.js": ["app/identity.js"], "identity.html": "app/identity.html", "js/sntcontroller.js": ["app/sntcontroller.js"],