From 042edb0ad07aa67dc30dac3024744dacab1a9623 Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Wed, 8 Jan 2025 16:40:57 -0700 Subject: [PATCH] fix(app): more robust insufficient balance error check --- app/hooks/useIssueAttestation.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/hooks/useIssueAttestation.tsx b/app/hooks/useIssueAttestation.tsx index ed1cce96e9..c01dadb324 100644 --- a/app/hooks/useIssueAttestation.tsx +++ b/app/hooks/useIssueAttestation.tsx @@ -171,7 +171,9 @@ export const useIssueAttestation = ({ chain }: { chain?: Chain }) => { errorMessage = "Transaction rejected by user"; } else if ( errorMessage.includes("insufficient funds") || - e?.info?.error?.data?.message?.includes("insufficient funds") + e?.info?.error?.data?.message?.includes("insufficient funds") || + errorMessage.includes("cost exceeds account balance") || + e?.info?.error?.data?.message?.includes("cost exceeds account balance") ) { errorMessage = "You don't have sufficient funds to bring your data onchain. Consider funding your wallet first.";