Skip to content

Commit

Permalink
fix: if token account, then include parent account name
Browse files Browse the repository at this point in the history
  • Loading branch information
kallen-ledger committed May 29, 2024
1 parent edede01 commit fc43907
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,9 @@ export const renderSwapDeviceConfirmation = ({
}) => {
const sourceAccountCurrency = getAccountCurrency(exchange.fromAccount);
const targetAccountCurrency = getAccountCurrency(exchange.toAccount);
const parentAccountName =
exchange.toParentAccount &&
accountNameSelector(walletState, { accountId: exchange.toParentAccount.id });
const sourceAccountName = accountNameSelector(walletState, {
accountId: exchange.fromAccount.id,
});
Expand All @@ -971,7 +974,9 @@ export const renderSwapDeviceConfirmation = ({
const targetAccountName =
accountNameSelector(walletState, {
accountId: exchange.toAccount.id,
}) ?? targetAccountCurrency.name;
}) ?? targetAccountCurrency.type === "CryptoCurrency"
? targetAccountCurrency.name
: `${parentAccountName} ${targetAccountCurrency.name}`;

const providerName = getProviderName(exchangeRate.provider);
const noticeType = getNoticeType(exchangeRate.provider);
Expand Down

0 comments on commit fc43907

Please sign in to comment.