From d1d1dff300e0bb8f8d0880dd69617e1a3b91538c Mon Sep 17 00:00:00 2001 From: Meriem-BM Date: Wed, 24 Jul 2024 09:57:34 +0100 Subject: [PATCH] fix: change error code to 4001 --- src/services/passport.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/passport.ts b/src/services/passport.ts index ab4ec9cbb4..93ea2c0e15 100644 --- a/src/services/passport.ts +++ b/src/services/passport.ts @@ -68,8 +68,8 @@ export const connectPassport = async (account: string, singin: boolean) => { return true; } catch (error: any) { console.error('error', error); - if (error.code === 'ACTION_REJECTED') { - showToastError('Rejected By User'); + if (error.code === 4001) { + showToastError('User rejected the request.'); } else { showToastError(error); }