Skip to content

Commit 54ad21c

Browse files
authored
fix(hooks): fix TypeScript and ESLint errors in useTransactionWatcher (#2019)
1 parent 7d5f5c1 commit 54ad21c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

apps/namadillo/src/hooks/useTransactionWatcher.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,16 @@ export const useTransactionWatcher = (): void => {
2828
case "TransparentToShielded":
2929
case "ShieldedToTransparent":
3030
case "ShieldedToShielded": {
31-
const newTx = await handleStandardTransfer(tx, fetchTransaction);
32-
dispatchTransferEvent(transactionTypeToEventName(tx), newTx);
31+
try {
32+
const newTx = await handleStandardTransfer(tx, fetchTransaction);
33+
dispatchTransferEvent(transactionTypeToEventName(tx), newTx);
34+
} catch (error: unknown) {
35+
console.warn("Transaction fetch failed (likely pruned):", error);
36+
dispatchTransferEvent(transactionTypeToEventName(tx), {
37+
...tx,
38+
status: "error",
39+
});
40+
}
3341
break;
3442
}
3543

0 commit comments

Comments
 (0)