File tree Expand file tree Collapse file tree
states/stateProvider/actionCreators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ export const updateWallet = controllerMethodWrapper(CONTROLLER_NAME)(
77)
88export const getCurrentWallet = controllerMethodWrapper ( CONTROLLER_NAME ) ( controller => ( ) => controller . getCurrent ( ) )
99export const getWalletList = controllerMethodWrapper ( CONTROLLER_NAME ) ( controller => ( ) => controller . getAll ( ) )
10+
11+ export const createWallet = controllerMethodWrapper ( CONTROLLER_NAME ) (
12+ controller => ( params : Controller . CreateWalletParams ) => controller . create ( params )
13+ )
1014export const importMnemonic = controllerMethodWrapper ( CONTROLLER_NAME ) (
1115 controller => ( params : Controller . ImportMnemonicParams ) => controller . importMnemonic ( params )
1216)
@@ -41,6 +45,7 @@ export const updateAddressDescription = controllerMethodWrapper(CONTROLLER_NAME)
4145export default {
4246 updateWallet,
4347 getWalletList,
48+ createWallet,
4449 importMnemonic,
4550 importKeystore,
4651 deleteWallet,
Original file line number Diff line number Diff line change 11import { AppActions , StateDispatch } from 'states/stateProvider/reducer'
22import {
33 getWalletList ,
4+ createWallet ,
45 importMnemonic ,
56 importKeystore ,
67 getCurrentWallet ,
@@ -44,7 +45,7 @@ export const createWalletWithMnemonic = (params: Controller.ImportMnemonicParams
4445 _dispatch : StateDispatch ,
4546 history : any
4647) => {
47- importMnemonic ( params ) . then ( res => {
48+ createWallet ( params ) . then ( res => {
4849 if ( res . status ) {
4950 history . push ( Routes . Overview )
5051 } else {
Original file line number Diff line number Diff line change 11declare namespace Controller {
2+ interface CreateWalletParams {
3+ name : string
4+ mnemonic : string
5+ password : string
6+ }
27 interface ImportMnemonicParams {
38 name : string
49 mnemonic : string
You can’t perform that action at this time.
0 commit comments