Skip to content

Commit

Permalink
Fix restake error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
shibatales committed Jan 23, 2024
1 parent 13a5abb commit 59a3ca6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/routes/staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,11 @@ const Staking = () => {
handleRestakingLogic,
});

if (!result) {
// Halt if there is a restake error
return;
}

if (initialUnclaimed.current !== null) {
setTotalClaimed(prevTotalClaimed => prevTotalClaimed.plus(initialUnclaimed.current || new BigNumber(0)));
}
Expand Down

0 comments on commit 59a3ca6

Please sign in to comment.