重构duckduckgo邮箱获取

This commit is contained in:
QLHazyCoder
2026-05-12 02:26:46 +08:00
parent 745010d6c9
commit f81cc74c29
16 changed files with 492 additions and 53 deletions
+9 -1
View File
@@ -30,6 +30,7 @@
rerunStep7ForStep8Recovery,
reuseOrCreateTab,
sendToContentScriptResilient,
buildRegistrationEmailStateUpdates = null,
phoneVerificationHelpers = null,
setState,
shouldUseCustomRegistrationEmail,
@@ -258,8 +259,15 @@
async function resetStep8AfterEmailInUse(state, visibleStep) {
const currentEmail = String(state?.email || '').trim();
const registrationEmailUpdates = typeof buildRegistrationEmailStateUpdates === 'function'
? buildRegistrationEmailStateUpdates(state, {
currentEmail: null,
preservePrevious: true,
source: 'step8_recovery',
})
: { email: null };
await setState({
email: null,
...registrationEmailUpdates,
step8VerificationTargetEmail: '',
loginVerificationRequestedAt: null,
});