Setting STT as default token and minor cosmetic edits
This commit is contained in:
parent
f5901c2c7e
commit
56f3266187
|
@ -12,7 +12,6 @@ import PropTypes from 'prop-types';
|
||||||
import STT from 'Embark/contracts/STT';
|
import STT from 'Embark/contracts/STT';
|
||||||
import TestContract from 'Embark/contracts/TestContract';
|
import TestContract from 'Embark/contracts/TestContract';
|
||||||
import TextField from '@material-ui/core/TextField';
|
import TextField from '@material-ui/core/TextField';
|
||||||
import Typography from '@material-ui/core/Typography';
|
|
||||||
import config from '../config';
|
import config from '../config';
|
||||||
import web3 from 'Embark/web3';
|
import web3 from 'Embark/web3';
|
||||||
import {withStyles} from '@material-ui/core/styles';
|
import {withStyles} from '@material-ui/core/styles';
|
||||||
|
@ -49,7 +48,10 @@ class ApproveAndCallGasRelayed extends Component {
|
||||||
|
|
||||||
componentDidMount(){
|
componentDidMount(){
|
||||||
EmbarkJS.onReady(() => {
|
EmbarkJS.onReady(() => {
|
||||||
this.setState({baseToken: STT.options.address});
|
this.setState({
|
||||||
|
baseToken: STT.options.address,
|
||||||
|
gasToken: STT.options.address
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import Card from '@material-ui/core/Card';
|
||||||
import CardActions from '@material-ui/core/CardActions';
|
import CardActions from '@material-ui/core/CardActions';
|
||||||
import CardContent from '@material-ui/core/CardContent';
|
import CardContent from '@material-ui/core/CardContent';
|
||||||
import CardHeader from '@material-ui/core/CardHeader';
|
import CardHeader from '@material-ui/core/CardHeader';
|
||||||
|
import EmbarkJS from 'Embark/EmbarkJS';
|
||||||
import Grid from '@material-ui/core/Grid';
|
import Grid from '@material-ui/core/Grid';
|
||||||
import IdentityGasRelay from 'Embark/contracts/IdentityGasRelay';
|
import IdentityGasRelay from 'Embark/contracts/IdentityGasRelay';
|
||||||
import MySnackbarContentWrapper from './snackbar';
|
import MySnackbarContentWrapper from './snackbar';
|
||||||
|
@ -50,6 +51,13 @@ class CallGasRelayed extends Component {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount(){
|
||||||
|
EmbarkJS.onReady(() => {
|
||||||
|
this.setState({
|
||||||
|
gasToken: STT.options.address
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
handleChange = name => event => {
|
handleChange = name => event => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, {Component} from 'react';
|
import React, {Component, Fragment} from 'react';
|
||||||
import AddIcon from '@material-ui/icons/Add';
|
import AddIcon from '@material-ui/icons/Add';
|
||||||
import BalanceIcon from '@material-ui/icons/AccountBalance';
|
import BalanceIcon from '@material-ui/icons/AccountBalance';
|
||||||
import Button from '@material-ui/core/Button';
|
import Button from '@material-ui/core/Button';
|
||||||
|
@ -43,7 +43,7 @@ const styles = theme => ({
|
||||||
},
|
},
|
||||||
right: {
|
right: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: theme.spacing.unit * 12,
|
top: theme.spacing.unit * 4,
|
||||||
right: theme.spacing.unit * 2
|
right: theme.spacing.unit * 2
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -187,9 +187,7 @@ class Status extends Component {
|
||||||
const {classes, identityAddress, nonce} = this.props;
|
const {classes, identityAddress, nonce} = this.props;
|
||||||
const {identityEthBalance, relayerAddress, relayerEthBalance, identitySTTBalance, relayerSTTBalance, submitState, block} = this.state;
|
const {identityEthBalance, relayerAddress, relayerEthBalance, identitySTTBalance, relayerSTTBalance, submitState, block} = this.state;
|
||||||
|
|
||||||
return <div className={classes.container}>
|
return <Fragment>
|
||||||
{ (submitState.createIdentity || submitState.etherSend || submitState.generateSTT) && <LinearProgress /> }
|
|
||||||
|
|
||||||
<Card className={classes.card}>
|
<Card className={classes.card}>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Typography>
|
<Typography>
|
||||||
|
@ -198,6 +196,10 @@ class Status extends Component {
|
||||||
<pre>{this.props.message}</pre>
|
<pre>{this.props.message}</pre>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
<div className={classes.container}>
|
||||||
|
{ (submitState.createIdentity || submitState.etherSend || submitState.generateSTT) && <LinearProgress /> }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<List dense={true}>
|
<List dense={true}>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
|
@ -287,7 +289,8 @@ class Status extends Component {
|
||||||
Block<br />#{block}
|
Block<br />#{block}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>
|
||||||
|
</Fragment>;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue