From b21a4f5b4b61e2ad0eeb6eb13871f3edc8bf17ff Mon Sep 17 00:00:00 2001 From: nick134 <76399455+nick134-bit@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:35:01 +0200 Subject: [PATCH] chore: Error Message for unclaimed rewards (#268) Co-authored-by: nick134 --- components/Pages/BondingActions/hooks/useTransaction.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/Pages/BondingActions/hooks/useTransaction.tsx b/components/Pages/BondingActions/hooks/useTransaction.tsx index b40d0eff..ed8467f4 100644 --- a/components/Pages/BondingActions/hooks/useTransaction.tsx +++ b/components/Pages/BondingActions/hooks/useTransaction.tsx @@ -162,7 +162,10 @@ export const useTransaction = () => { } else if (/out of gas/i.test(e?.toString())) { setError('Out of gas, try increasing gas limit on wallet.') message = 'Out of gas, try increasing gas limit on wallet.' - } else if ( + } else if (/There are unclaimed rewards available./i.test(e?.toString())) { + setError('There are unclaimed rewards available.') + message = 'There are unclaimed rewards available. Claim them before attempting to bond/unbond.' + }else if ( /was submitted but was not yet found on the chain/i.test( e?.toString() )