Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit a470848

Browse files
authored
Merge branch '1.0' into issue/2562
2 parents 58e1a5c + 5f6adde commit a470848

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/web3-eth-accounts/src/models/Account.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default class Account {
102102
* @returns {EncryptedKeystoreV3Json | {version, id, address, crypto}}
103103
*/
104104
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);
106106
}
107107

108108
/**
@@ -114,7 +114,7 @@ export default class Account {
114114
* @returns {Account}
115115
*/
116116
static from(entropy, accounts = {}) {
117-
return new Account(create(entropy || randomHex(32)), accounts.transactionSigner);
117+
return new Account(create(entropy || randomHex(32)), accounts);
118118
}
119119

120120
/**
@@ -126,7 +126,7 @@ export default class Account {
126126
* @returns {Account}
127127
*/
128128
static fromPrivateKey(privateKey, accounts = {}) {
129-
return new Account(fromPrivate(privateKey), accounts.transactionSigner);
129+
return new Account(fromPrivate(privateKey), accounts);
130130
}
131131

132132
/**
@@ -267,6 +267,6 @@ export default class Account {
267267
);
268268
const seed = `0x${Buffer.concat([decipher.update(ciphertext), decipher.final()]).toString('hex')}`;
269269

270-
return this.fromPrivateKey(seed, accounts);
270+
return Account.fromPrivateKey(seed, accounts);
271271
}
272272
}

0 commit comments

Comments
 (0)