Skip to content

Commit

Permalink
fix(recaptcha): enable recaptcha for wallet login
Browse files Browse the repository at this point in the history
  • Loading branch information
robertu7 committed Oct 17, 2023
1 parent 3d255d2 commit e786f2e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/Forms/Verification/SendCodeButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useState } from 'react'
import { useContext, useState } from 'react'

import { SEND_CODE_COUNTDOWN, VERIFICATION_CODE_TYPES } from '~/common/enums'
import {
Button,
// ReCaptchaContext,
ReCaptchaContext,
TextIcon,
Translate,
useLegacyCountdown,
Expand Down Expand Up @@ -36,7 +36,7 @@ interface VerificationSendCodeButtonProps {
export const VerificationSendCodeButton: React.FC<
VerificationSendCodeButtonProps
> = ({ email, type, disabled }) => {
// const { token, refreshToken } = useContext(ReCaptchaContext)
const { token, refreshToken } = useContext(ReCaptchaContext)

const [send] = useMutation<SendVerificationCodeMutation>(SEND_CODE)
const [sent, setSent] = useState(false)
Expand All @@ -48,15 +48,15 @@ export const VerificationSendCodeButton: React.FC<
const sendCode = async () => {
// reCaptcha check is disabled for now
await send({
variables: { input: { email, type, token: '' } },
variables: { input: { email, type, token } },
})

setCountdown({ timeLeft: SEND_CODE_COUNTDOWN })
setSent(true)

// if (refreshToken) {
// refreshToken()
// }
if (refreshToken) {
refreshToken()
}
}

return (
Expand Down

0 comments on commit e786f2e

Please sign in to comment.