Skip to content

Commit

Permalink
fix aion/eth token transfer issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leoaion committed Jul 9, 2019
1 parent 21f359f commit 440e141
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion coins/aion/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function validateBalanceSufficiency(account, symbol, amount, extra_params, netwo
if (gasPrice.multipliedBy(gasLimit).dividedBy(BigNumber(10).pow(9)).isGreaterThan(balance)) {
resolve({result: false, err: 'error_insufficient_amount'});
}
let totalCoins = account.tokens[network][symbol].balance;
let totalCoins = account.tokens[symbol].balance;
if (transferAmount.isGreaterThan(totalCoins)) {
resolve({result: false, err: 'error_insufficient_amount'});
}
Expand Down
3 changes: 1 addition & 2 deletions coins/eth/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function formatAddress1Line(address) {
}

function validateBalanceSufficiency(account, symbol, amount, extra_params, network='mainnet') {
console.log("extra_params: ", extra_params);
return new Promise((resolve, reject) => {
if (!validateAmount(amount)) resolve({result: false, err: 'error_format_amount'});
if (!validateAmount(extra_params['gasPrice'])) resolve({result: false, err: 'error_invalid_gas_price'});
Expand All @@ -62,7 +61,7 @@ function validateBalanceSufficiency(account, symbol, amount, extra_params, netwo
if (gasPrice.multipliedBy(gasLimit).dividedBy(BigNumber(10).pow(9)).isGreaterThan(balance)) {
resolve({result: false, err: 'error_insufficient_amount'});
}
let totalCoins = account.tokens[network][symbol].balance;
let totalCoins = account.tokens[symbol].balance;
if (transferAmount.isGreaterThan(totalCoins)) {
resolve({result: false, err: 'error_insufficient_amount'});
}
Expand Down
1 change: 1 addition & 0 deletions components/signed/vault/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ class Send extends Component {
resolve(false);
}
}).catch(e=>{
console.log(e);
alert_ok(strings('alert_title_error'), strings('send.' + e.err));
resolve(false);
});
Expand Down

0 comments on commit 440e141

Please sign in to comment.