Skip to content

Commit ae4e285

Browse files
refactor(mosaic): name the MFA reverification condition
1 parent 7ae152d commit ae4e285

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎packages/mosaic/src/features/user-profile/user-profile-mfa-section/user-profile-mfa-section.controller.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,15 @@ function createSetupProps(
421421
const sms = flow.kind === 'sms' ? flow : undefined;
422422
const authenticator = flow.kind === 'authenticator' ? flow : undefined;
423423
const backup = flow.kind === 'backup' ? flow : undefined;
424+
const isReverifying = REVERIFIABLE_ACTIONS.includes(context.pending) && reverification.visible;
424425
return {
425-
step:
426-
REVERIFIABLE_ACTIONS.includes(context.pending) && reverification.visible
427-
? 'verify'
428-
: flow.kind === 'closed'
429-
? 'select'
430-
: flow.kind === 'backup'
431-
? 'backup-codes'
432-
: flow.kind,
426+
step: isReverifying
427+
? 'verify'
428+
: flow.kind === 'closed'
429+
? 'select'
430+
: flow.kind === 'backup'
431+
? 'backup-codes'
432+
: flow.kind,
433433
reverification,
434434
methods: model.addableMethods,
435435
onSelect: actions.select,

0 commit comments

Comments
 (0)