mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +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