From fda7687997794ef4d4024284d7fd0f8b5eaba943 Mon Sep 17 00:00:00 2001 From: KishiTheMechanic Date: Mon, 7 Oct 2024 11:13:22 +0200 Subject: [PATCH] hide user reject --- src/components/providers/SolanaWalletProvider.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/providers/SolanaWalletProvider.tsx b/src/components/providers/SolanaWalletProvider.tsx index 73cb494..31b7c68 100644 --- a/src/components/providers/SolanaWalletProvider.tsx +++ b/src/components/providers/SolanaWalletProvider.tsx @@ -27,7 +27,10 @@ export default function SolanaWalletProvider({ children }: Props) { const onError = useCallback( (error: WalletError) => { - if (!error.message.includes('user rejected the request.')) { + if ( + !error.message.includes('user rejected the request.') && + !error.message.includes('User rejected the request.') + ) { toast({ title: error.name, description: error.message, @@ -42,7 +45,10 @@ export default function SolanaWalletProvider({ children }: Props) { async (adapter: Adapter) => { adapter.autoConnect().catch(async (e) => { if (e instanceof Error) { - if (!e.message.includes('user rejected the request.')) { + if ( + !e.message.includes('user rejected the request.') && + !e.message.includes('User rejected the request.') + ) { toast({ title: e.name, description: e.message,