Skip to content

Commit

Permalink
fix: tx local status errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Argeare5 committed Sep 18, 2023
1 parent 224f25f commit b8fdd2a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hooks/useLastTxLocalStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ export const useLastTxLocalStatus = <T extends BaseTx>({
const txChainId = tx && tx.chainId;
const txWalletType = tx && tx.walletType;

useEffect(() => {
return () => {
setFullTxErrorMessage('');
setError('');
};
}, []);

useEffect(() => {
if (txPending || isError) {
setIsTxStart(true);
Expand Down Expand Up @@ -84,5 +91,6 @@ export const useLastTxLocalStatus = <T extends BaseTx>({
isError,
executeTxWithLocalStatuses,
fullTxErrorMessage,
setFullTxErrorMessage,
};
};

0 comments on commit b8fdd2a

Please sign in to comment.