mirror of
https://github.com/trezor/trezor-wallet
synced 2024-10-31 21:18:54 +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;
|
if (!token) return;
|
||||||
|
|
||||||
const contract = web3instance.erc20.at(token.address);
|
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,
|
from: account.address,
|
||||||
gasLimit: currentState.gasLimit,
|
gasLimit: currentState.gasLimit,
|
||||||
gasPrice: currentState.gasPrice
|
gasPrice: currentState.gasPrice
|
||||||
|
Loading…
Reference in New Issue
Block a user