Skip to content

Commit

Permalink
fix: dont show progress bar until a valid result is received from tho…
Browse files Browse the repository at this point in the history
…rnode
  • Loading branch information
woodenfurniture committed Sep 1, 2023
1 parent 5ada9c1 commit eba708a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export const TradeConfirm = () => {
isSubmitting={isSubmitting}
px={4}
/>
{isThorStreamingSwap && (
{status !== TxStatus.Unknown && isThorStreamingSwap && (
<Stack px={4}>
<Row>
<Row.Label>{translate('trade.streamStatus')}</Row.Label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ export const useThorStreamingProgress = (
poll({
fn: async () => {
const updatedStreamingSwapData = await getThorchainStreamingSwap(txHash)
if (!updatedStreamingSwapData) return
if (!updatedStreamingSwapData || !updatedStreamingSwapData.quantity) return
setStreamingSwapData(updatedStreamingSwapData)
return updatedStreamingSwapData
},
validate: streamingSwapData => {
if (!streamingSwapData) return false
if (!streamingSwapData || !streamingSwapData.quantity) return false
return streamingSwapData.count === streamingSwapData.quantity
},
interval: POLL_INTERVAL_MILLISECONDS,
Expand Down

0 comments on commit eba708a

Please sign in to comment.