diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-05 22:12:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-05 22:12:06 +0800 |
commit | 697d5adfc857e6e1338167a14757b38eb4d3172c (patch) | |
tree | bd657661a3f107666f67c40b6b448b8210f8c7b7 /ui/app/actions.js | |
parent | 7bbd6e70393027bbbeecccdef71eaf70aac52c45 (diff) | |
parent | f3a7054f6b25a43b55bb6bda77b084171d611d12 (diff) | |
download | tangerine-wallet-browser-697d5adfc857e6e1338167a14757b38eb4d3172c.tar.gz tangerine-wallet-browser-697d5adfc857e6e1338167a14757b38eb4d3172c.tar.zst tangerine-wallet-browser-697d5adfc857e6e1338167a14757b38eb4d3172c.zip |
Merge pull request #6082 from whymarrh/migrate-to-new-ui
Migrate all users to the new UI
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index c4212f35b..f3e9d2b27 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -317,6 +317,11 @@ var actions = { UPDATE_PREFERENCES: 'UPDATE_PREFERENCES', setUseNativeCurrencyAsPrimaryCurrencyPreference, + // Migration of users to new UI + setCompletedUiMigration, + completeUiMigration, + COMPLETE_UI_MIGRATION: 'COMPLETE_UI_MIGRATION', + // Onboarding setCompletedOnboarding, completeOnboarding, @@ -2474,6 +2479,31 @@ function completeOnboarding () { } } +function setCompletedUiMigration () { + return dispatch => { + dispatch(actions.showLoadingIndication()) + return new Promise((resolve, reject) => { + background.completeUiMigration(err => { + dispatch(actions.hideLoadingIndication()) + + if (err) { + dispatch(actions.displayWarning(err.message)) + return reject(err) + } + + dispatch(actions.completeUiMigration()) + resolve() + }) + }) + } +} + +function completeUiMigration () { + return { + type: actions.COMPLETE_UI_MIGRATION, + } +} + function setNetworkNonce (networkNonce) { return { type: actions.SET_NETWORK_NONCE, |