Skip to content

Commit

Permalink
[#522] fix reading pending transaction from localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dyczka authored and jdyczka committed Mar 26, 2024
1 parent bc5665d commit 6d59394
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ export const usePendingTransaction = ({
const fromLocalStorage = getItemFromLocalStorage(
`${PENDING_TRANSACTION_KEY}_${stakeKey}`
);
setTransaction({
if (!fromLocalStorage) setTransaction(null);
else setTransaction({
...fromLocalStorage,
resourceId: fromLocalStorage?.resourceId ?? undefined,
resourceId: fromLocalStorage.resourceId ?? undefined,
});
}
}, [isEnabled, stakeKey]);
Expand Down

0 comments on commit 6d59394

Please sign in to comment.