fix: execute decodeParams for all sendTokenTxs

This commit is contained in:
fernandomg 2020-04-23 12:47:19 -03:00 committed by Mikhail Mikheev
parent 0cd526f47a
commit edcfd2e32e
1 changed files with 19 additions and 17 deletions

View File

@ -133,7 +133,8 @@ export const buildTransactionFrom = async (
let symbol = txTokenSymbol || 'ETH'
let decimals = txTokenDecimals || 18
let decodedParams
if (isSendTokenTx && (txTokenSymbol === null || txTokenDecimals === null)) {
if (isSendTokenTx) {
if (txTokenSymbol === null || txTokenDecimals === null) {
try {
const [tokenSymbol, tokenDecimals] = await Promise.all(
generateBatchRequests({
@ -152,6 +153,7 @@ export const buildTransactionFrom = async (
isSendTokenTx = false
customTx = true
}
}
const params = web3.eth.abi.decodeParameters(['address', 'uint256'], tx.data.slice(10))
decodedParams = {