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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - actions | |
| // - XState (all XState exports) | |
| const sessionDefinition = { |
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
| TRANSFER_STATES = { | |
| IDLE: 'idle', | |
| ERROR: 'error', | |
| VALIDATING_USERNAME: 'validating_username', | |
| VALIDATING_FLOW_ADDRESS: 'validating_flow_address', | |
| CREATING_TRANSFER: 'creating_transfer', | |
| POLLING_FOR_INVOCATION: 'polling_for_invocation', | |
| SUCCESS: 'success', | |
| BLOCKED: 'blocked', | |
| } |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
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 IGNORE_ERRORS_DURATION = 3000; | |
| const FS = { | |
| IDLE: 'idle', | |
| UNSEALED_RESET: 'unsealed_reset', | |
| UNSEALED_ERROR: 'unsealed_error', | |
| OPENING: 'opening', | |
| GETTING_MOMENTS: 'getting_moments', | |
| } | |
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 createMachine = ({...props}) => { | |
| return Machine({...props}) | |
| } | |
| const ERROR_MESSAGES = { | |
| GENERAL: 'There was an error.' | |
| } | |
| const showcases = [ | |
| { |
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
| TRANSFER_STATES = { | |
| IDLE: 'idle', | |
| VALIDATING_USERNAME: 'validating_username', | |
| VALIDATING_FLOW_ADDRESS: 'validating_flow_address', | |
| CREATING_TRANSFER: 'creating_transfer', | |
| POLLING_FOR_INVOCATION: 'polling_for_invocation', | |
| SUCCESS: 'success', | |
| } | |
| Machine({ |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
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 IGNORE_ERRORS_DURATION = 3000; | |
| const FS = { | |
| IDLE: 'idle', | |
| UNSEALED_RESET: 'unsealed_reset', | |
| OPENING: 'opening', | |
| UNSEALED_RETRYING: 'unsealed_retrying', | |
| POLLING_PACK: 'polling_pack', | |
| GETTING_MOMENTS: 'getting_moments', | |
| DONE: 'done', |