From e0d391398ead7098a2921f612ded15cf92e78986 Mon Sep 17 00:00:00 2001 From: kev1n-peters <96065607+kev1n-peters@users.noreply.github.com> Date: Fri, 20 Sep 2024 09:58:54 -0500 Subject: [PATCH] redeem: show token display name instead of internal token key (#2670) * redeem: show token display name instead of internal token key * add config to deps --- wormhole-connect/src/views/v2/Redeem/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wormhole-connect/src/views/v2/Redeem/index.tsx b/wormhole-connect/src/views/v2/Redeem/index.tsx index 7b3e516fb..81e4f9b1b 100644 --- a/wormhole-connect/src/views/v2/Redeem/index.tsx +++ b/wormhole-connect/src/views/v2/Redeem/index.tsx @@ -27,7 +27,7 @@ import useTrackTransfer from 'hooks/useTrackTransfer'; import PoweredByIcon from 'icons/PoweredBy'; import { SDKv2Signer } from 'routes/sdkv2/signer'; import { setRoute } from 'store/router'; -import { displayAddress, millisToHumanString } from 'utils'; +import { displayAddress, getDisplayName, millisToHumanString } from 'utils'; import { interpretTransferError } from 'utils/errors'; import { joinClass } from 'utils/style'; import { minutesAndSecondsWithPadding } from 'utils/transferValidation'; @@ -203,8 +203,10 @@ const Redeem = () => { } else if (isTxDestQueued) { return Transaction delayed; } else if (isTxAttested) { + const token = config.tokens[receivedTokenKey]; + const displayName = token ? getDisplayName(token, toChain) : ''; return ( - {`${receiveAmount} ${receivedTokenKey} received at ${displayAddress( + {`${receiveAmount} ${displayName} received at ${displayAddress( toChain, recipient, )}`} @@ -222,6 +224,7 @@ const Redeem = () => { receivedTokenKey, recipient, toChain, + config, ]); // Displays the ETA value and the countdown within the ETA circle