Skip to content

Commit

Permalink
Revert "fix(reset): skip creating nabu user and passing country for r…
Browse files Browse the repository at this point in the history
…eset"

This reverts commit 1b7dd8d.
  • Loading branch information
TheLeoB committed Sep 2, 2021
1 parent 93672a9 commit 48f29fb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/blockchain-wallet-v4-frontend/src/data/auth/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ export default ({ api, coreSagas, networks }) => {
email = undefined,
firstLogin = false,
country = undefined,
state = undefined,
recovery = false
state = undefined
}) {
try {
// If needed, the user should upgrade its wallet before being able to open the wallet
Expand All @@ -254,7 +253,6 @@ export default ({ api, coreSagas, networks }) => {
yield put(actions.auth.upgradeWallet(4))
yield take(actionTypes.core.walletSync.SYNC_SUCCESS)
}
const isAccountReset: boolean = yield select(selectors.auth.getAccountReset)
// Finish upgrades
yield put(actions.auth.authenticate())
yield put(actions.auth.setFirstLogin(firstLogin))
Expand All @@ -278,11 +276,7 @@ export default ({ api, coreSagas, networks }) => {
yield put(actions.core.settings.setCurrency(currency))
// fetch settings again
yield call(coreSagas.settings.fetchSettings)
if (!isAccountReset) {
yield put(actions.router.push('/verify-email-step'))
} else {
yield put(actions.router.push('/home'))
}
yield put(actions.router.push('/verify-email-step'))
} else {
yield put(actions.router.push('/home'))
}
Expand Down Expand Up @@ -320,7 +314,7 @@ export default ({ api, coreSagas, networks }) => {
const signupCountryEnabled = (yield select(
selectors.core.walletOptions.getFeatureSignupCountry
)).getOrElse(false)
if (firstLogin && signupCountryEnabled && !isAccountReset && !recovery) {
if (firstLogin && signupCountryEnabled) {
// create nabu user
yield call(createUser)
// store initial address in case of US state we add prefix
Expand Down

0 comments on commit 48f29fb

Please sign in to comment.