From 9291fadf69dd3c7e9fbce5c2b5870832dcae4932 Mon Sep 17 00:00:00 2001 From: Etienne Dusseault Date: Wed, 23 Sep 2020 14:15:03 +0800 Subject: [PATCH] Amount: fix 'data' value for transaction info not being populated with ERC20 tokens --- app/components/Views/SendFlow/Amount/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/components/Views/SendFlow/Amount/index.js b/app/components/Views/SendFlow/Amount/index.js index 130abad6ec0..4f2b168dfce 100644 --- a/app/components/Views/SendFlow/Amount/index.js +++ b/app/components/Views/SendFlow/Amount/index.js @@ -540,18 +540,18 @@ class Amount extends PureComponent { from: selectedAddress }; - if (selectedAsset.erc20) { + if (selectedAsset.tokenId) { + const collectibleTransferTransactionProperties = this.getCollectibleTranferTransactionProperties(); + transactionObject.data = collectibleTransferTransactionProperties.data; + transactionObject.to = collectibleTransferTransactionProperties.to; + transactionObject.value = collectibleTransferTransactionProperties.value; + } else if (!selectedAsset.isETH) { const tokenAmount = toTokenMinimalUnit(value, selectedAsset.decimals); transactionObject.data = generateTransferData('transfer', { toAddress: transactionTo, amount: BNToHex(tokenAmount) }); transactionObject.value = '0x0'; - } else if (selectedAsset.tokenId) { - const collectibleTransferTransactionProperties = this.getCollectibleTranferTransactionProperties(); - transactionObject.data = collectibleTransferTransactionProperties.data; - transactionObject.to = collectibleTransferTransactionProperties.to; - transactionObject.value = collectibleTransferTransactionProperties.value; } if (paymentChannelTransaction || selectedAsset.erc20) {