Skip to content

Commit bea4b20

Browse files
committed
feat(neuron-ui): navigate to the Overview view on wallet switching
1 parent c0a20bd commit bea4b20

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

  • packages/neuron-ui/src/states/stateProvider/actionCreators

packages/neuron-ui/src/states/stateProvider/actionCreators/app.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ import {
1313
} from 'utils/localCache'
1414

1515
export const initAppState = () => (dispatch: StateDispatch, history: any) => {
16-
dispatch({
17-
type: AppActions.UpdateLoadings,
18-
payload: {
19-
addressList: true,
20-
transactionList: true,
21-
},
22-
})
2316
getNeuronWalletState()
2417
.then(res => {
2518
if (res.status) {
@@ -49,6 +42,8 @@ export const initAppState = () => (dispatch: StateDispatch, history: any) => {
4942
})
5043
if (!wallet) {
5144
history.push(`${Routes.WalletWizard}${WalletWizardPath.Welcome}`)
45+
} else {
46+
history.push(Routes.Overview)
5247
}
5348

5449
currentWalletCache.save(wallet)
@@ -63,15 +58,6 @@ export const initAppState = () => (dispatch: StateDispatch, history: any) => {
6358
.catch(() => {
6459
history.push(`${Routes.WalletWizard}${WalletWizardPath.Welcome}`)
6560
})
66-
.finally(() => {
67-
dispatch({
68-
type: AppActions.UpdateLoadings,
69-
payload: {
70-
addressList: false,
71-
transactionList: false,
72-
},
73-
})
74-
})
7561
}
7662

7763
export const addPopup = (text: string) => (dispatch: StateDispatch) => {

0 commit comments

Comments
 (0)