Skip to content

Commit

Permalink
feat: check status is success
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki committed Jan 27, 2024
1 parent 775ea8f commit bda4bb0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ function TransactionDialogContent({ route, onClose, isAmountError, transactionCo
},
});

historyId && txHistory.success(historyId);
setTxComplete(true);
} catch (err: unknown) {
if (process.env.NODE_ENV === "development") {
Expand Down Expand Up @@ -200,15 +199,14 @@ function TransactionDialogContent({ route, onClose, isAmountError, transactionCo
</p>,
);
}
historyId && txHistory.fail(historyId);
} finally {
setOngoing(false);
}
}

const estimatedFinalityTime = useFinalityTimeEstimate(route);

if (isTxComplete) {
if (isTxComplete && txStatus.data?.isSuccess) {
return (
<TransactionSuccessView
route={route}
Expand Down

0 comments on commit bda4bb0

Please sign in to comment.