-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.x' into release/1.3.1
- Loading branch information
Showing
2 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -394,22 +394,26 @@ describe('transaction and message signing [ @E2E ]', function() { | |
// Smoke test to validate browserify's buffer polyfills (feross/buffer@5) | ||
// A companion regression test for Webpack & feross/[email protected] exists at: | ||
// test/eth.accounts.webpack.js | ||
it("encrypt then decrypt wallet", async function() { | ||
this.timeout(10000); | ||
|
||
const password = "qwerty"; | ||
const addressFromWallet = wallet[0].address; | ||
it("encrypt then decrypt wallet", function(done) { | ||
this.timeout(20000); | ||
try { | ||
const password = "qwerty"; | ||
const addressFromWallet = wallet[0].address; | ||
|
||
const keystore = wallet.encrypt(password); | ||
const keystore = wallet.encrypt(password); | ||
|
||
// Wallet created w/ 10 accounts in before block | ||
assert.equal(keystore.length, 10); | ||
// Wallet created w/ 10 accounts in before block | ||
assert.equal(keystore.length, 10); | ||
|
||
wallet.decrypt(keystore, password); | ||
assert.equal(wallet.length, 10); | ||
wallet.decrypt(keystore, password); | ||
assert.equal(wallet.length, 10); | ||
|
||
const addressFromKeystore = wallet[0].address; | ||
assert.equal(addressFromKeystore, addressFromWallet); | ||
const addressFromKeystore = wallet[0].address; | ||
assert.equal(addressFromKeystore, addressFromWallet); | ||
done() | ||
} catch(error) { | ||
done(error) | ||
} | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters