mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 01:08:27 +00:00
Token amount decimals fix
This commit is contained in:
parent
1007477bae
commit
94c58d0b13
@ -739,7 +739,9 @@ export const onSend = (): AsyncAction => {
|
||||
if (!token) return;
|
||||
|
||||
const contract = web3instance.erc20.at(token.address);
|
||||
data = contract.transfer.getData(currentState.address, currentState.amount, {
|
||||
const amountValue: string = new BigNumber(currentState.amount).times( Math.pow(10, token.decimals) ).toString();
|
||||
|
||||
data = contract.transfer.getData(currentState.address, amountValue, {
|
||||
from: account.address,
|
||||
gasLimit: currentState.gasLimit,
|
||||
gasPrice: currentState.gasPrice
|
||||
|
Loading…
Reference in New Issue
Block a user