Created
July 23, 2020 15:54
-
-
Save gabrocheleau/6cf7dde673dfab6709468bd26d6ae044 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains 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 walletConnectionMachine = Machine({ | |
id: 'walletConnection', | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
SUBMIT: 'loading', | |
}, | |
}, | |
loading: { on: { CONNECTED: 'connected', ERROR: 'error' } }, | |
connected: { | |
on: { | |
DISCONNECTED: 'error', | |
}, | |
}, | |
error: { | |
on: { | |
RETRY: 'loading', | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment