diff --git a/packages/swapper/src/swappers/ThorchainSwapper/endpoints.ts b/packages/swapper/src/swappers/ThorchainSwapper/endpoints.ts
index 70550b27d74..40442034733 100644
--- a/packages/swapper/src/swappers/ThorchainSwapper/endpoints.ts
+++ b/packages/swapper/src/swappers/ThorchainSwapper/endpoints.ts
@@ -373,7 +373,7 @@ export const thorchainApi: SwapperApi = {
}
const latestOutTx = data.out_txs?.[data.out_txs.length - 1]
- const hasOutboundTx = latestOutTx?.chain !== 'THOR'
+ const hasOutboundTx = latestOutTx !== undefined && latestOutTx.chain !== 'THOR'
const buyTxHash = parseThorBuyTxHash(txHash, latestOutTx)
@@ -395,7 +395,6 @@ export const thorchainApi: SwapperApi = {
}
const { message, status } = getLatestThorTxStatusMessage(data, hasOutboundTx)
-
return {
buyTxHash,
status,
diff --git a/packages/swapper/src/swappers/ThorchainSwapper/utils/getLatestThorTxStatusMessage.ts b/packages/swapper/src/swappers/ThorchainSwapper/utils/getLatestThorTxStatusMessage.ts
index e47e4c99b8f..8f9dbe97b45 100644
--- a/packages/swapper/src/swappers/ThorchainSwapper/utils/getLatestThorTxStatusMessage.ts
+++ b/packages/swapper/src/swappers/ThorchainSwapper/utils/getLatestThorTxStatusMessage.ts
@@ -61,7 +61,10 @@ export const getLatestThorTxStatusMessage = (
}
}
- return { message: obj.pending ? 'Swap pending' : 'Swap complete', status: TxStatus.Pending }
+ return {
+ message: obj.pending ? 'Swap pending' : 'Swap complete, awaiting finalization',
+ status: TxStatus.Pending,
+ }
}
case 'swap_finalised': {
const obj = response.stages[key]
@@ -69,7 +72,7 @@ export const getLatestThorTxStatusMessage = (
if (!hasOutboundTx && obj.completed) {
return {
- message: 'Swap finalized',
+ message: undefined, // undefined because the tx is complete and no message will be displayed
status: TxStatus.Confirmed,
}
}
diff --git a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/StreamingSwap.tsx b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/StreamingSwap.tsx
index 5112be1351b..05d30593848 100644
--- a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/StreamingSwap.tsx
+++ b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/StreamingSwap.tsx
@@ -26,7 +26,7 @@ export const StreamingSwap = (props: StreamingSwapProps) => {
{translate('trade.streamStatus')}
{totalSwapCount > 0 && (
- {`${attemptedSwapCount} of ${totalSwapCount}`}
+ {`${attemptedSwapCount - failedSwaps.length} of ${totalSwapCount}`}
)}
@@ -36,7 +36,7 @@ export const StreamingSwap = (props: StreamingSwapProps) => {
size='sm'
min={0}
max={totalSwapCount}
- value={attemptedSwapCount}
+ value={attemptedSwapCount - failedSwaps.length}
hasStripe={!isComplete}
isAnimated={!isComplete}
colorScheme={isComplete ? 'green' : 'blue'}
diff --git a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/hooks/useThorStreamingProgress.tsx b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/hooks/useThorStreamingProgress.tsx
index bf8ef51bdc0..d9c7c260322 100644
--- a/src/components/MultiHopTrade/components/MultiHopTradeConfirm/hooks/useThorStreamingProgress.tsx
+++ b/src/components/MultiHopTrade/components/MultiHopTradeConfirm/hooks/useThorStreamingProgress.tsx
@@ -153,9 +153,11 @@ export const useThorStreamingProgress = (
}, [cancelPolling, dispatch, hopIndex, poll, sellTxHash, confirmedTradeId])
const result = useMemo(() => {
+ const numSuccessfulSwaps =
+ (streamingSwapMeta?.attemptedSwapCount ?? 0) - (streamingSwapMeta?.failedSwaps?.length ?? 0)
+
const isComplete =
- streamingSwapMeta !== undefined &&
- streamingSwapMeta.attemptedSwapCount === streamingSwapMeta.totalSwapCount
+ streamingSwapMeta !== undefined && numSuccessfulSwaps >= streamingSwapMeta.totalSwapCount
return {
isComplete,