From daae1dce857f6e30f5ee4a14bdec9b03fed7f110 Mon Sep 17 00:00:00 2001 From: MananTank Date: Tue, 12 Nov 2024 19:29:20 +0000 Subject: [PATCH] Update condition for showing verify email button in faucet claim section (#5394) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR updates the email verification logic for claiming from the faucet in the `FaucetButton` component. It changes the condition to check for both unconfirmed email and the absence of a confirmed email. ### Detailed summary - Modified the condition to check if `emailConfirmedAt` is falsy and if `unconfirmedEmail` is truthy. - Removed the previous check for `accountQuery.data.status === "noCustomer"`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../(chainPage)/components/client/FaucetButton.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx index 94becff9eeb..887c49d646a 100644 --- a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx +++ b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx @@ -202,7 +202,10 @@ export function FaucetButton({ } // Email verification is required to claim from the faucet - if (accountQuery.data.status === "noCustomer") { + if ( + !accountQuery.data.emailConfirmedAt && + !accountQuery.data.unconfirmedEmail + ) { return ( <>