Skip to content

Commit

Permalink
chore(app): disable verification for all evm stamps while one click v…
Browse files Browse the repository at this point in the history
…erification is in progress (#2517)
  • Loading branch information
digitalmnt authored and larisa17 committed May 30, 2024
1 parent 57d3cbb commit 6ee5fd9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/components/GenericPlatform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
2 changes: 0 additions & 2 deletions app/context/userState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ export const userWarningAtom = atom<UserWarning | undefined>(undefined);
export interface UserVerification {
loading: boolean;
success: boolean;
possiblePlatforms: string[];
error?: string;
}

export const userVerificationAtom = atom<UserVerification>({
loading: false,
success: false,
error: undefined,
possiblePlatforms: [],
});

export const mutableUserVerificationAtom = atom(
Expand Down
3 changes: 0 additions & 3 deletions app/hooks/useOneClickVerification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const useOneClickVerification = () => {
setUserVerificationState({
...verificationState,
loading: true,
possiblePlatforms: platformTypes,
});
const validatedProviderIds = possiblePlatforms
.map((platform) =>
Expand Down Expand Up @@ -85,7 +84,6 @@ export const useOneClickVerification = () => {
...verificationState,
loading: false,
success: true,
possiblePlatforms: [],
});
toast({
duration: 9000,
Expand All @@ -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) });
}
Expand Down

0 comments on commit 6ee5fd9

Please sign in to comment.