Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redeem: show token display name instead of internal token key #2670

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading