Skip to content

Commit

Permalink
redeem: show token display name instead of internal token key (#2670)
Browse files Browse the repository at this point in the history
* redeem: show token display name instead of internal token key

* add config to deps
  • Loading branch information
kev1n-peters committed Sep 20, 2024
1 parent 3677c07 commit e0d3913
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wormhole-connect/src/views/v2/Redeem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -203,8 +203,10 @@ const Redeem = () => {
} else if (isTxDestQueued) {
return <Stack>Transaction delayed</Stack>;
} else if (isTxAttested) {
const token = config.tokens[receivedTokenKey];
const displayName = token ? getDisplayName(token, toChain) : '';
return (
<Stack>{`${receiveAmount} ${receivedTokenKey} received at ${displayAddress(
<Stack>{`${receiveAmount} ${displayName} received at ${displayAddress(
toChain,
recipient,
)}`}</Stack>
Expand All @@ -222,6 +224,7 @@ const Redeem = () => {
receivedTokenKey,
recipient,
toChain,
config,
]);

// Displays the ETA value and the countdown within the ETA circle
Expand Down

0 comments on commit e0d3913

Please sign in to comment.