From 59a3ca666d22ab5e7958274e42e834b41192dce8 Mon Sep 17 00:00:00 2001 From: Yaki Date: Tue, 23 Jan 2024 11:03:15 -0800 Subject: [PATCH] Fix restake error handling --- src/routes/staking.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/routes/staking.tsx b/src/routes/staking.tsx index f0ef3ec..2815734 100644 --- a/src/routes/staking.tsx +++ b/src/routes/staking.tsx @@ -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))); }