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