From 269aaa6fb59b3a9d92d7c0b206507724d42ee28e Mon Sep 17 00:00:00 2001 From: Alex Donesky Date: Thu, 13 Jan 2022 15:21:20 -0600 Subject: [PATCH] fix send duck standard setting bug in updateSendAsset (#13289) --- ui/ducks/send/send.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js index 9dde7b2a5..355e81e49 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -1434,11 +1434,15 @@ export function updateSendAsset({ type, details }) { state.send.account.address ?? getSelectedAddress(state), ); // TODO remove along with migration of isERC721 tokens and stripping away this designation - if (details && details.isERC721 === undefined) { - const updatedAssetDetails = await updateTokenType(details.address); - details.isERC721 = updatedAssetDetails.isERC721; + if (details) { + if (details.isERC721 === undefined) { + const updatedAssetDetails = await updateTokenType(details.address); + details.isERC721 = updatedAssetDetails.isERC721; + } + if (details.standard === undefined) { + details.standard = ERC20; + } } - details.standard = ERC20; await dispatch(hideLoadingIndication()); } else if (type === ASSET_TYPES.COLLECTIBLE) { let isCurrentOwner = true;