File tree 3 files changed +11
-0
lines changed
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { IWallet } from '../interfaces'
5
5
import { activeProfile as activeProfileStore } from '../stores'
6
6
import { getSecretManagerFromProfileType , getStorageDirectoryOfProfile } from '../utils'
7
7
import { WalletOptions } from '@iota/sdk'
8
+ import { selectedWalletId } from '../../wallet'
8
9
9
10
// TODO(2.0): Fix and finish this method
10
11
/* - __storage__/
@@ -28,9 +29,15 @@ export async function createWallet(activeProfile = get(activeProfileStore)): Pro
28
29
} ,
29
30
coinType : activeProfile . network . coinType
30
31
}
32
+ console . log ( "walletOptions" , walletOptions ) ;
33
+
31
34
const wallet = await api . createWallet ( id , {
32
35
...walletOptions ,
33
36
storagePath,
34
37
} )
38
+
39
+ // TODO(2.0): Fix
40
+ selectedWalletId . set ( id )
41
+ console . log ( "wallet in createWallet" , wallet ) ;
35
42
return wallet
36
43
}
Original file line number Diff line number Diff line change @@ -3,5 +3,7 @@ import { getSelectedWallet } from '@core/wallet/stores'
3
3
4
4
export function getClient ( ) : Promise < Client > {
5
5
const wallet = getSelectedWallet ( ) ;
6
+ console . log ( "wallet in getClient" , wallet ) ;
7
+
6
8
return wallet ! . getClient ( )
7
9
}
Original file line number Diff line number Diff line change @@ -3,5 +3,7 @@ import { getSelectedWallet } from '../stores'
3
3
4
4
export async function setClientOptions ( clientOptions : Partial < ClientOptions > ) : Promise < void > {
5
5
const wallet = getSelectedWallet ( ) ;
6
+ console . log ( "wallet in setClientOptions" , wallet ) ;
7
+
6
8
await wallet . setClientOptions ( clientOptions )
7
9
}
You can’t perform that action at this time.
0 commit comments