Pass gas & gasPrice to token transfers (#2964)

This commit is contained in:
Jaco Greeff 2016-10-29 15:32:10 +02:00 committed by Gav Wood
parent 144930f12c
commit 49a7b84f14
2 changed files with 6 additions and 4 deletions

View File

@ -43,7 +43,7 @@ export default class ActionBuyIn extends Component {
accountError: ERRORS.invalidAccount,
amount: 0,
amountError: ERRORS.invalidAmount,
maxPrice: api.util.fromWei(this.props.price.mul(1.2)).toString(),
maxPrice: api.util.fromWei(this.props.price.mul(1.2)).toFixed(0),
maxPriceError: null,
sending: false,
complete: false

View File

@ -420,13 +420,15 @@ export default class Transfer extends Component {
_sendToken () {
const { account, balance } = this.props;
const { recipient, value, tag } = this.state;
const { gas, gasPrice, recipient, value, tag } = this.state;
const token = balance.tokens.find((balance) => balance.token.tag === tag).token;
return token.contract.instance.transfer
.postTransaction({
from: account.address,
to: token.address
to: token.address,
gas,
gasPrice
}, [
recipient,
new BigNumber(value).mul(token.format).toFixed(0)
@ -483,7 +485,7 @@ export default class Transfer extends Component {
to: token.address
}, [
recipient,
new BigNumber(value || 0).mul(token.format).toString()
new BigNumber(value || 0).mul(token.format).toFixed(0)
]);
}