From 2ad6ffaeb536c5927524df14a8fda6371e12928a Mon Sep 17 00:00:00 2001 From: Andrea Rampin Date: Thu, 11 Jan 2024 12:01:49 +1100 Subject: [PATCH] fix: WT-2040 - dynamic from and to address in the in-progress screen (#1338) --- .../src/components/Transactions/TransactionItem.tsx | 9 +++++++-- .../components/Transactions/TransactionsInProgress.tsx | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/checkout/widgets-lib/src/components/Transactions/TransactionItem.tsx b/packages/checkout/widgets-lib/src/components/Transactions/TransactionItem.tsx index 7841e2974b..4b6fa151b4 100644 --- a/packages/checkout/widgets-lib/src/components/Transactions/TransactionItem.tsx +++ b/packages/checkout/widgets-lib/src/components/Transactions/TransactionItem.tsx @@ -8,6 +8,7 @@ import { Icon, MenuItem, Link, + EllipsizedText, } from '@biom3/react'; import { ChainId } from '@imtbl/checkout-sdk'; import { logoColour, networkIcon, networkName } from 'lib'; @@ -27,6 +28,8 @@ type TransactionItemProps = { amount: string fromChain: ChainId toChain: ChainId + fromAddress: string + toAddress: string // action: () => void }; @@ -37,6 +40,8 @@ export function TransactionItem({ amount, fromChain, toChain, + fromAddress, + toAddress, // action }: TransactionItemProps) { // The action prop is designed for injecting the action to perform @@ -172,7 +177,7 @@ export function TransactionItem({ {networkName[fromChain]} - 0x1E8d...CfDf + {networkName[toChain]} - 0x1E8d...CfDf + diff --git a/packages/checkout/widgets-lib/src/components/Transactions/TransactionsInProgress.tsx b/packages/checkout/widgets-lib/src/components/Transactions/TransactionsInProgress.tsx index 9932aacef9..a22f606f50 100644 --- a/packages/checkout/widgets-lib/src/components/Transactions/TransactionsInProgress.tsx +++ b/packages/checkout/widgets-lib/src/components/Transactions/TransactionsInProgress.tsx @@ -72,6 +72,8 @@ export function TransactionsInProgress({ amount={amount} fromChain={getChainIdBySlug(t.details.from_chain as ChainSlug)} toChain={getChainIdBySlug(t.details.to_chain as ChainSlug)} + fromAddress={t.details.from_address} + toAddress={t.details.to_address} /> ); })}