MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / waitForVerificationSubmitOutcome

Function waitForVerificationSubmitOutcome

content/signup-page.js:1242–1277  ·  view source on GitHub ↗
(step, timeout)

Source from the content-addressed store, hash-verified

1240
1241
1242async function waitForVerificationSubmitOutcome(step, timeout) {
1243 const resolvedTimeout = timeout ?? (step === 7 ? 30000 : 12000);
1244 const start = Date.now();
1245
1246 while (Date.now() - start < resolvedTimeout) {
1247 throwIfStopped();
1248
1249 const errorText = getVerificationErrorText();
1250 if (errorText) {
1251 return { invalidCode: true, errorText };
1252 }
1253
1254 if (step === 4 && isStep5Ready()) {
1255 return { success: true };
1256 }
1257
1258 if (step === 7 && isStep8Ready()) {
1259 return { success: true };
1260 }
1261
1262 if (step === 7 && isAddPhonePageReady()) {
1263 return { success: true, addPhonePage: true };
1264 }
1265
1266 await sleep(150);
1267 }
1268
1269 if (isVerificationPageStillVisible()) {
1270 return {
1271 invalidCode: true,
1272 errorText: getVerificationErrorText() || '提交后仍停留在验证码页面,准备重新发送验证码。',
1273 };
1274 }
1275
1276 return { success: true, assumed: true };
1277}
1278
1279async function fillVerificationCode(step, payload) {
1280 const { code } = payload;

Callers 1

fillVerificationCodeFunction · 0.85

Calls 7

getVerificationErrorTextFunction · 0.85
isStep5ReadyFunction · 0.85
isStep8ReadyFunction · 0.85
isAddPhonePageReadyFunction · 0.85
sleepFunction · 0.85
throwIfStoppedFunction · 0.70

Tested by

no test coverage detected