Skip to content

Commit

Permalink
fix: WT-2040 - dynamic from and to address in the in-progress screen (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrearampin authored Jan 11, 2024
1 parent e6f73e6 commit 2ad6ffa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Icon,
MenuItem,
Link,
EllipsizedText,
} from '@biom3/react';
import { ChainId } from '@imtbl/checkout-sdk';
import { logoColour, networkIcon, networkName } from 'lib';
Expand All @@ -27,6 +28,8 @@ type TransactionItemProps = {
amount: string
fromChain: ChainId
toChain: ChainId
fromAddress: string
toAddress: string
// action: () => void
};

Expand All @@ -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
Expand Down Expand Up @@ -172,7 +177,7 @@ export function TransactionItem({
<Body size="xxSmall" sx={{ color: 'base.color.translucent.standard.900' }}>
{networkName[fromChain]}
</Body>
<Body size="xxSmall" sx={{ color: 'base.color.translucent.standard.600' }}>0x1E8d...CfDf</Body>
<EllipsizedText size="xxSmall" sx={{ color: 'base.color.translucent.standard.600' }} text={fromAddress} />
</Box>
<Box sx={{ flexGrow: '1' }} />
<Icon
Expand Down Expand Up @@ -202,7 +207,7 @@ export function TransactionItem({
<Body size="xxSmall" sx={{ color: 'base.color.translucent.standard.900' }}>
{networkName[toChain]}
</Body>
<Body size="xxSmall" sx={{ color: 'base.color.translucent.standard.600' }}>0x1E8d...CfDf</Body>
<EllipsizedText size="xxSmall" sx={{ color: 'base.color.translucent.standard.600' }} text={toAddress} />
</Box>
</Box>
</Accordion.ExpandedContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
);
})}
Expand Down

0 comments on commit 2ad6ffa

Please sign in to comment.