Skip to content

Instantly share code, notes, and snippets.

@seansu4you87
Created July 12, 2020 10:11
Show Gist options
  • Save seansu4you87/a8fe3f24271fb2603cfa3db237d951af to your computer and use it in GitHub Desktop.
Save seansu4you87/a8fe3f24271fb2603cfa3db237d951af to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const parachuteMachine = Machine({
"id": "parachute",
"initial": "fresh",
"states": {
"fresh": {
"on": {
"transition_to_auth": "auth",
"transition_to_loan_application": "loan_application",
"transition_to_active": "active"
}
},
"auth": {
"on": {
"transition_to_loan_application": "loan_application",
"transition_to_active": "active"
},
"id": "auth",
"initial": "phone_number",
"states": {
"phone_number": {
"on": {
"transition_to_sending_phone_number": "sending_phone_number"
}
},
"sending_phone_number": {
"on": {
"transition_to_phone_number": "phone_number",
"transition_to_verification_code": "verification_code"
}
},
"verification_code": {
"on": {
"transition_to_sending_verification_code": "sending_verification_code"
}
},
"sending_verification_code": {
"on": {
"transition_to_verification_code": "verification_code",
"transition_to_verified": "verified"
}
},
"verified": {
"type": "final"
}
}
},
"loan_application": {
"on": {
"transition_to_active": "active"
},
"id": "loan_application",
"initial": "identity",
"states": {
"identity": {
"on": {
"transition_to_location": "location"
}
},
"location": {
"on": {
"transition_to_plaid": "plaid"
}
},
"plaid": {
"on": {
"transition_to_submitting_plaid": "submitting_plaid"
}
},
"submitting_plaid": {
"on": {
"transition_to_plaid": "plaid",
"transition_to_finished": "finished"
}
},
"finished": {
"type": "final"
}
}
},
"active": {
"on": {
"transition_to_auth": "auth"
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment