Skip to content

Instantly share code, notes, and snippets.

@export-mike
Last active April 3, 2023 02:19
Show Gist options
  • Select an option

  • Save export-mike/1bbfff2cc0e06b78ccd7d72f0e8fb27d to your computer and use it in GitHub Desktop.

Select an option

Save export-mike/1bbfff2cc0e06b78ccd7d72f0e8fb27d to your computer and use it in GitHub Desktop.

Revisions

  1. export-mike revised this gist Apr 3, 2023. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions machine.js
    Original file line number Diff line number Diff line change
    @@ -17,8 +17,8 @@
    },
    completeFields: {
    on: {
    BETA_COMPLETE: 'kyc',
    POST_BETA_COMPLETE: 'mfa',
    BETA: 'kyc',
    POST_BETA: 'mfa',
    DROP_OUT_OF_FLOW: 'nilApplication',
    INELIGLE: 'ineligible'
    }
    @@ -46,7 +46,7 @@
    on: {
    LIMITED_LIVE: 'completeFields',
    BETA: 'completeFields',
    SOME_TIME_IN_THE_FUTURE:'blockApplication'
    POST_BETA:'blockApplication'
    }
    },
    blockApplication: {}
  2. export-mike revised this gist Apr 3, 2023. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion machine.js
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,8 @@
    },
    completeFields: {
    on: {
    COMPLETE: 'mfa',
    BETA_COMPLETE: 'kyc',
    POST_BETA_COMPLETE: 'mfa',
    DROP_OUT_OF_FLOW: 'nilApplication',
    INELIGLE: 'ineligible'
    }
  3. export-mike revised this gist Apr 3, 2023. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions machine.js
    Original file line number Diff line number Diff line change
    @@ -44,9 +44,11 @@
    doWeBlock: {
    on: {
    LIMITED_LIVE: 'completeFields',
    BETA: 'completeFields'
    BETA: 'completeFields',
    SOME_TIME_IN_THE_FUTURE:'blockApplication'
    }
    }
    },
    blockApplication: {}
    }
    });

  4. export-mike revised this gist Apr 3, 2023. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion machine.js
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,10 @@
    }
    },
    doWeBlock: {

    on: {
    LIMITED_LIVE: 'completeFields',
    BETA: 'completeFields'
    }
    }
    }
    });
  5. export-mike revised this gist Apr 3, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion machine.js
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,6 @@
    const fetchMachine = Machine({
    id: 'onboarding',
    initial: 'nilApplication',
    ps: 'test',
    context: {
    retries: 0
    },
  6. export-mike revised this gist Apr 3, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions machine.js
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@
    const fetchMachine = Machine({
    id: 'onboarding',
    initial: 'nilApplication',
    ps: 'test',
    context: {
    retries: 0
    },
  7. export-mike revised this gist Apr 3, 2023. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions machine.js
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,8 @@
    completeFields: {
    on: {
    COMPLETE: 'mfa',
    DROP_OUT_OF_FLOW: 'nilApplication'
    DROP_OUT_OF_FLOW: 'nilApplication',
    INELIGLE: 'ineligible'
    }
    },
    mfa: {
    @@ -30,10 +31,11 @@
    kyc: {
    on: {
    COMPLETE: 'invest',
    DROP_OUT_OF_FLOW: 'mfa'
    DROP_OUT_OF_FLOW: 'mfa',
    INELIGLE: 'ineligible'
    }
    },
    inelligble: {
    ineligible: {
    on: {
    RESTART: 'completeFields',
    USA_RESTART: 'doWeBlock'
  8. export-mike revised this gist Apr 3, 2023. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions machine.js
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,15 @@
    COMPLETE: 'invest',
    DROP_OUT_OF_FLOW: 'mfa'
    }
    },
    inelligble: {
    on: {
    RESTART: 'completeFields',
    USA_RESTART: 'doWeBlock'
    }
    },
    doWeBlock: {

    }
    }
    });
  9. export-mike created this gist Apr 3, 2023.
    38 changes: 38 additions & 0 deletions machine.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@

    const fetchMachine = Machine({
    id: 'onboarding',
    initial: 'nilApplication',
    context: {
    retries: 0
    },
    states: {
    invest: {

    },
    nilApplication: {
    on: {
    COMPLETE_FIELDS: 'completeFields',
    NOVA_PRODUCT_INSTANCE: 'invest'
    }
    },
    completeFields: {
    on: {
    COMPLETE: 'mfa',
    DROP_OUT_OF_FLOW: 'nilApplication'
    }
    },
    mfa: {
    on: {
    COMPLETE: 'kyc',
    DROP_OUT_OF_FLOW: 'mfa'
    }
    },
    kyc: {
    on: {
    COMPLETE: 'invest',
    DROP_OUT_OF_FLOW: 'mfa'
    }
    }
    }
    });