Skip to content

Commit

Permalink
fix: new swapper flow cow buy Tx links (#8496)
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre authored Jan 7, 2025
1 parent 8eeb60d commit b8fd619
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export const ExpandedStepperSteps = ({ activeTradeQuote }: ExpandedStepperStepsP
)}
{firstHopSwap.buyTxHash && firstHopSwap.buyTxHash !== firstHopSwap.sellTxHash && (
<TxLabel
isBuyTxHash
txHash={firstHopSwap.buyTxHash}
explorerBaseUrl={tradeQuoteFirstHop.buyAsset.explorerTxLink}
accountId={firstHopSellAccountId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ export const TxLabel = ({
explorerBaseUrl,
accountId,
swapperName,
isBuyTxHash,
}: {
txHash: string
explorerBaseUrl: string
accountId: AccountId
swapperName: SwapSource | undefined
isBuyTxHash?: boolean
}) => {
const { data: maybeSafeTx } = useSafeTxQuery({
maybeSafeTxHash: txHash,
Expand All @@ -24,9 +26,9 @@ export const TxLabel = ({
const txLink = getTxLink({
defaultExplorerBaseUrl: explorerBaseUrl,
maybeSafeTx,
tradeId: txHash,
accountId,
name: swapperName,
...(isBuyTxHash ? { txId: txHash } : { tradeId: txHash }),
})

return txLink ? (
Expand Down

0 comments on commit b8fd619

Please sign in to comment.