From a4d9c41b3b39a42dbdb21007516b8e0e40025952 Mon Sep 17 00:00:00 2001 From: Tim <6887938+digitalmnt@users.noreply.github.com> Date: Tue, 28 May 2024 14:16:49 -0600 Subject: [PATCH] chore(app): disable verification for all evm stamps while one click verification is in progress (#2517) --- app/components/GenericPlatform.tsx | 4 ++-- app/context/userState.tsx | 2 -- app/hooks/useOneClickVerification.tsx | 3 --- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/components/GenericPlatform.tsx b/app/components/GenericPlatform.tsx index 285528077..9bfbfb58d 100644 --- a/app/components/GenericPlatform.tsx +++ b/app/components/GenericPlatform.tsx @@ -403,8 +403,8 @@ export const GenericPlatform = ({ }; const isReverifying = useMemo( - () => verificationState.loading && verificationState.possiblePlatforms.includes(platform.platformId), - [verificationState.loading, verificationState.possiblePlatforms, platform.platformId] + () => verificationState.loading && platform.isEVM, + [verificationState.loading, platform.isEVM] ); const buttonText = useMemo(() => { diff --git a/app/context/userState.tsx b/app/context/userState.tsx index fdbc8b4cd..3435e29bd 100644 --- a/app/context/userState.tsx +++ b/app/context/userState.tsx @@ -19,7 +19,6 @@ export const userWarningAtom = atom(undefined); export interface UserVerification { loading: boolean; success: boolean; - possiblePlatforms: string[]; error?: string; } @@ -27,7 +26,6 @@ export const userVerificationAtom = atom({ loading: false, success: false, error: undefined, - possiblePlatforms: [], }); export const mutableUserVerificationAtom = atom( diff --git a/app/hooks/useOneClickVerification.tsx b/app/hooks/useOneClickVerification.tsx index ca9287768..380d4ff2d 100644 --- a/app/hooks/useOneClickVerification.tsx +++ b/app/hooks/useOneClickVerification.tsx @@ -45,7 +45,6 @@ export const useOneClickVerification = () => { setUserVerificationState({ ...verificationState, loading: true, - possiblePlatforms: platformTypes, }); const validatedProviderIds = possiblePlatforms .map((platform) => @@ -85,7 +84,6 @@ export const useOneClickVerification = () => { ...verificationState, loading: false, success: true, - possiblePlatforms: [], }); toast({ duration: 9000, @@ -105,7 +103,6 @@ export const useOneClickVerification = () => { ...verificationState, loading: false, error: String(error), - possiblePlatforms: [], }); datadogLogs.logger.error("Error when attempting on click verification", { error: String(error) }); }