aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-09-11 06:45:34 +0800
committerDan Finlay <dan@danfinlay.com>2016-09-11 06:45:34 +0800
commit9b861b6687d5b079560a67b35e4a4890da643b03 (patch)
tree3748d15d568a0352a598e2dbb27d834f80583530 /test
parent5e60b2f0c4c1a88839a87cc93d867c9c40d1090d (diff)
downloadtangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.gz
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.bz2
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.lz
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.xz
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.tar.zst
tangerine-wallet-browser-9b861b6687d5b079560a67b35e4a4890da643b03.zip
Fixed caching bug
Fixed bug where the second new vault created in an IdStore would initially return the accounts from the original store. Also fixed some tests that were incorrect.
Diffstat (limited to 'test')
-rw-r--r--test/unit/idStore-test.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js
index b3bb1a49c..a763eb0e7 100644
--- a/test/unit/idStore-test.js
+++ b/test/unit/idStore-test.js
@@ -73,7 +73,7 @@ describe('IdentityStore', function() {
},
{
seed: 'radar blur cabbage chef fix engine embark joy scheme fiction master release',
- account: '0xe15D894BeCB0354c501AE69429B05143679F39e0',
+ account: '0xe15d894becb0354c501ae69429b05143679f39e0',
},
{
seed: 'phone coyote caught pattern found table wedding list tumble broccoli chief swing',
@@ -91,10 +91,6 @@ describe('IdentityStore', function() {
seed: 'flavor tiger carpet motor angry hungry document inquiry large critic usage liar',
account: '0xb571be96558940c4e9292e1999461aa7499fb6cd',
},
- {
- seed: 'this is a twelve word phrase seven eight nine ten eleven twelve',
- account: '0x814e8ec0c3647e140b8e09228fc374b2a867fe48',
- },
]
before(function() {
@@ -115,10 +111,13 @@ describe('IdentityStore', function() {
it('should enforce seed compliance with TestRPC', function (done) {
const tests = assertions.map((assertion) => {
return function (cb) {
+ accounts = []
idStore.recoverFromSeed(password, assertion.seed, (err) => {
assert.ifError(err)
- assert.equal(accounts[0], assertion.account)
+ var received = accounts[0].toLowerCase()
+ var expected = assertion.account.toLowerCase()
+ assert.equal(received, expected)
cb()
})
}