(step, state = {}, options = {})
| 321 | } |
| 322 | |
| 323 | function getHotmailVerificationRequestTimestamp(step, state = {}, options = {}) { |
| 324 | const bufferMs = Number(options.bufferMs) || 15_000; |
| 325 | const signupRequestedAt = normalizeTimestamp(state.signupVerificationRequestedAt); |
| 326 | const loginRequestedAt = normalizeTimestamp(state.loginVerificationRequestedAt); |
| 327 | const lastEmailTimestamp = normalizeTimestamp(state.lastEmailTimestamp); |
| 328 | const flowStartTime = normalizeTimestamp(state.flowStartTime); |
| 329 | |
| 330 | if (step === 4 && signupRequestedAt) { |
| 331 | return Math.max(0, signupRequestedAt - bufferMs); |
| 332 | } |
| 333 | |
| 334 | if (step === 7 && loginRequestedAt) { |
| 335 | return Math.max(0, loginRequestedAt - bufferMs); |
| 336 | } |
| 337 | |
| 338 | return step === 7 |
| 339 | ? (lastEmailTimestamp || flowStartTime || 0) |
| 340 | : (flowStartTime || 0); |
| 341 | } |
| 342 | |
| 343 | function getHotmailMailApiRequestConfig() { |
| 344 | return { |
no test coverage detected