diff --git a/docs/pages/wallets/auth/email-otp.mdx b/docs/pages/wallets/auth/email-otp.mdx index c7aaf37..9309b04 100644 --- a/docs/pages/wallets/auth/email-otp.mdx +++ b/docs/pages/wallets/auth/email-otp.mdx @@ -21,7 +21,10 @@ import { useSendOTP, useVerifyOTP } from '@zerodev/wallet-react' function EmailOTPAuth() { const [email, setEmail] = useState('') const [code, setCode] = useState('') - const [otpId, setOtpId] = useState(null) + const [otp, setOtp] = useState<{ + otpId: string + otpEncryptionTargetBundle: string + } | null>(null) const { address, isConnected } = useAccount() const { disconnectAsync } = useDisconnect() @@ -37,7 +40,7 @@ function EmailOTPAuth() { ) } - if (!otpId) { + if (!otp) { return (
{ const result = await sendOTP.mutateAsync({ email }) - setOtpId(result.otpId) + setOtp(result) }} disabled={sendOTP.isPending || !email} > @@ -70,7 +73,7 @@ function EmailOTPAuth() { onChange={(e) => setCode(e.target.value)} />