Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2593 from ethcore/jg-send-estimategas-0
Browse files Browse the repository at this point in the history
Fix gas estimation on transfer when data supplied
  • Loading branch information
jacogr authored Oct 12, 2016
2 parents 08a7434 + 452f9ef commit a93604b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions js/src/dapps/signaturereg/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export function postRegister (instance, id, options = {}) {
.estimateGas(options, [id])
.then((gas) => {
options.gas = gas.mul(1.2).toFixed(0);
console.log('postRegister', `gas estimated at ${gas.toFormat(0)}, setting to ${gas.mul(1.2).toFormat(0)}`);
instance.register.postTransaction(options, [id]);
});
}
4 changes: 1 addition & 3 deletions js/src/modals/Transfer/transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,10 @@ export default class Transfer extends Component {
_estimateGasEth () {
const { api } = this.context;
const { account } = this.props;
const { data, gas, gasPrice, recipient, value } = this.state;
const { data, recipient, value } = this.state;
const options = {
from: account.address,
to: recipient,
gas,
gasPrice,
value: api.util.toWei(value || 0)
};

Expand Down

0 comments on commit a93604b

Please sign in to comment.