Last active
April 3, 2023 02:19
-
-
Save export-mike/1bbfff2cc0e06b78ccd7d72f0e8fb27d to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchMachine = Machine({ | |
id: 'onboarding', | |
initial: 'nilApplication', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
invest: { | |
}, | |
nilApplication: { | |
on: { | |
COMPLETE_FIELDS: 'completeFields', | |
NOVA_PRODUCT_INSTANCE: 'invest' | |
} | |
}, | |
completeFields: { | |
on: { | |
BETA: 'kyc', | |
POST_BETA: 'mfa', | |
DROP_OUT_OF_FLOW: 'nilApplication', | |
INELIGLE: 'ineligible' | |
} | |
}, | |
mfa: { | |
on: { | |
COMPLETE: 'kyc', | |
DROP_OUT_OF_FLOW: 'mfa' | |
} | |
}, | |
kyc: { | |
on: { | |
COMPLETE: 'invest', | |
DROP_OUT_OF_FLOW: 'mfa', | |
INELIGLE: 'ineligible' | |
} | |
}, | |
ineligible: { | |
on: { | |
RESTART: 'completeFields', | |
USA_RESTART: 'doWeBlock' | |
} | |
}, | |
doWeBlock: { | |
on: { | |
LIMITED_LIVE: 'completeFields', | |
BETA: 'completeFields', | |
POST_BETA:'blockApplication' | |
} | |
}, | |
blockApplication: {} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment