Skip to content

Commit

Permalink
fix: tx hash not showing in multiple transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki committed Feb 2, 2024
1 parent d3d7214 commit 4c3307b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/RouteDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function TransferStep({ action, actions, id, statusData }: TransferStepProps) {
// We can assume that the swap operation by the previous transfer
.find((x) => Number(x.id.split("-")[2]) === operationIndex + 1)
?.id.split("-")[0] === "swap";
const isPrevOpTransfer = actions[operationIndex - 1]?.type === "TRANSFER";

// We can assume that the transfer is successful when the state is TRANSFER_SUCCESS or TRANSFER_RECEIVED
const renderTransferState = useMemo(() => {
Expand Down Expand Up @@ -165,13 +166,14 @@ function TransferStep({ action, actions, id, statusData }: TransferStepProps) {
const packetTx = (() => {
if (operationIndex === 0) return transferStatus?.txs.sendTx;
if (isNextOpSwap) return transferStatus?.txs.sendTx;
if (isPrevOpTransfer) return transferStatus?.txs.sendTx;
return transferStatus?.txs.receiveTx;
})();
if (!packetTx?.explorerLink) {
return null;
}
return makeExplorerLink(packetTx.explorerLink);
}, [isNextOpSwap, operationIndex, transferStatus?.txs.receiveTx, transferStatus?.txs.sendTx]);
}, [isNextOpSwap, isPrevOpTransfer, operationIndex, transferStatus?.txs.receiveTx, transferStatus?.txs.sendTx]);

const { getAsset } = useAssets();

Expand Down

0 comments on commit 4c3307b

Please sign in to comment.