File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
utils/storage/update_handlers Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 58
58
"typescript" : " ^4.5"
59
59
},
60
60
"name" : " @psychedelic/plug-controller" ,
61
- "version" : " 0.24.5 " ,
61
+ "version" : " 0.24.6 " ,
62
62
"description" : " Internet Computer Plug wallet's controller" ,
63
63
"main" : " dist/index.js" ,
64
64
"scripts" : {
Original file line number Diff line number Diff line change 1
- export const PLUG_CONTROLLER_VERSION = "0.24.5 " ;
1
+ export const PLUG_CONTROLLER_VERSION = "0.24.6 " ;
Original file line number Diff line number Diff line change 1
1
import { createAccountFromMnemonic } from '../../../utils/account' ;
2
2
import { Types } from '../../../utils/account/constants' ;
3
+ import Secp256k1KeyIdentity from '../../identity/secpk256k1/identity' ;
3
4
5
+ const getKeyPair = ( identity : Secp256k1KeyIdentity ) => {
6
+ const jsonIdentity = identity . toJSON ( ) ;
7
+ return typeof jsonIdentity === 'string'
8
+ ? jsonIdentity
9
+ : JSON . stringify ( jsonIdentity ) ;
10
+ }
4
11
5
12
export default ( storage : any ) => {
6
13
const mnemonic = storage . mnemonic ;
@@ -14,7 +21,7 @@ export default (storage: any) => {
14
21
return ( {
15
22
...wallet ,
16
23
type : Types . mnemonic ,
17
- keyPair : identity . toJSON ( ) ,
24
+ keyPair : getKeyPair ( identity ) ,
18
25
} )
19
26
} )
20
27
}
You can’t perform that action at this time.
0 commit comments