(code: string)
| 79 | } |
| 80 | }; |
| 81 | const onVerifyCodeBetterAuth = async (code: string) => { |
| 82 | if (!pendingEmail) { |
| 83 | throw new Error('Request a verification code first'); |
| 84 | } |
| 85 | const result = await betterAuthVerifyChangeEmail(pendingEmail, code); |
| 86 | if (result.error) { |
| 87 | throw new Error(result.error); |
| 88 | } |
| 89 | displayToast('Your email address has been updated.'); |
| 90 | setPendingEmail(undefined); |
| 91 | setActiveDisplay(Display.Default); |
| 92 | await refetchBoot?.(); |
| 93 | }; |
| 94 | |
| 95 | const onChangeEmail = async (email: string) => { |
| 96 | if (!email) { |
nothing calls this directly
no test coverage detected