From ce5b4391b31ca2f2177c9b31856a56e6d446a775 Mon Sep 17 00:00:00 2001 From: nick134 <76399455+nick134-bit@users.noreply.github.com> Date: Thu, 14 Dec 2023 20:42:18 +0100 Subject: [PATCH] chore: error message on pending epochs (#449) --- .../Pages/Dashboard/BondingActions/hooks/useTransaction.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/Pages/Dashboard/BondingActions/hooks/useTransaction.tsx b/components/Pages/Dashboard/BondingActions/hooks/useTransaction.tsx index 03983278..3df17934 100644 --- a/components/Pages/Dashboard/BondingActions/hooks/useTransaction.tsx +++ b/components/Pages/Dashboard/BondingActions/hooks/useTransaction.tsx @@ -140,6 +140,9 @@ export const useTransaction = () => { } else if ((/out of gas/u).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 ((/before the new\/latest epoch/u).test(e?.toString())) { + setError('Epoch not yet created.') + message = 'Please force the pending epoch on the dashboard.' } else if ( (/There are unclaimed rewards available./u).test(e?.toString()) ) {