@@ -10,8 +10,10 @@ import {
1010 updateAddressDescription as updateRemoteAddressDescription ,
1111 deleteWallet as deleteRemoteWallet ,
1212 backupWallet as backupRemoteWallet ,
13+ showErrorMessage ,
1314} from 'services/remote'
1415import initStates from 'states/initStates'
16+ import i18n from 'utils/i18n'
1517import { wallets as walletsCache , currentWallet as currentWalletCache } from 'utils/localCache'
1618import { Routes } from 'utils/const'
1719import addressesToBalance from 'utils/addressesToBalance'
@@ -34,27 +36,27 @@ export const updateCurrentWallet = () => (dispatch: StateDispatch) => {
3436}
3537
3638export const createWalletWithMnemonic = ( params : Controller . ImportMnemonicParams ) => (
37- dispatch : StateDispatch ,
39+ _dispatch : StateDispatch ,
3840 history : any
3941) => {
4042 importMnemonic ( params ) . then ( res => {
4143 if ( res . status ) {
4244 history . push ( Routes . Overview )
4345 } else {
44- addNotification ( { type : 'alert' , content : res . message . title } ) ( dispatch )
46+ showErrorMessage ( i18n . t ( 'error' ) , i18n . t ( res . message . title ) )
4547 }
4648 } )
4749}
4850
4951export const importWalletWithMnemonic = ( params : Controller . ImportMnemonicParams ) => (
50- dispatch : StateDispatch ,
52+ _dispatch : StateDispatch ,
5153 history : any
5254) => {
5355 importMnemonic ( params ) . then ( res => {
5456 if ( res . status ) {
5557 history . push ( Routes . Overview )
5658 } else {
57- addNotification ( { type : 'alert' , content : res . message . title } ) ( dispatch )
59+ showErrorMessage ( i18n . t ( 'error' ) , i18n . t ( res . message . title ) )
5860 }
5961 } )
6062}
0 commit comments