@@ -102,7 +102,7 @@ export default class Account {
102
102
* @returns {EncryptedKeystoreV3Json | {version, id, address, crypto} }
103
103
*/
104
104
encrypt ( password , options ) {
105
- return Account . fromPrivateKey ( this . privateKey , this . accounts . transactionSigner ) . toV3Keystore ( password , options ) ;
105
+ return Account . fromPrivateKey ( this . privateKey , this . accounts ) . toV3Keystore ( password , options ) ;
106
106
}
107
107
108
108
/**
@@ -114,7 +114,7 @@ export default class Account {
114
114
* @returns {Account }
115
115
*/
116
116
static from ( entropy , accounts = { } ) {
117
- return new Account ( create ( entropy || randomHex ( 32 ) ) , accounts . transactionSigner ) ;
117
+ return new Account ( create ( entropy || randomHex ( 32 ) ) , accounts ) ;
118
118
}
119
119
120
120
/**
@@ -126,7 +126,7 @@ export default class Account {
126
126
* @returns {Account }
127
127
*/
128
128
static fromPrivateKey ( privateKey , accounts = { } ) {
129
- return new Account ( fromPrivate ( privateKey ) , accounts . transactionSigner ) ;
129
+ return new Account ( fromPrivate ( privateKey ) , accounts ) ;
130
130
}
131
131
132
132
/**
@@ -267,6 +267,6 @@ export default class Account {
267
267
) ;
268
268
const seed = `0x${ Buffer . concat ( [ decipher . update ( ciphertext ) , decipher . final ( ) ] ) . toString ( 'hex' ) } ` ;
269
269
270
- return this . fromPrivateKey ( seed , accounts ) ;
270
+ return Account . fromPrivateKey ( seed , accounts ) ;
271
271
}
272
272
}
0 commit comments