aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/idStore-migration-test.js
diff options
context:
space:
mode:
authorFrankie <frankie.diamond@gmail.com>2016-12-22 06:31:07 +0800
committerGitHub <noreply@github.com>2016-12-22 06:31:07 +0800
commit6f7c23fd28ef37ae51478b735c1f5888c97bbaf5 (patch)
treeb927871ed00c33a66341a26de09f00cf006314b8 /test/unit/idStore-migration-test.js
parenta85c691b71d5142d2412000930328fbe9161760a (diff)
parent73cdf0bfd49470bad1f0da4d0d894278c87af54e (diff)
downloadtangerine-wallet-browser-6f7c23fd28ef37ae51478b735c1f5888c97bbaf5.tar.gz
tangerine-wallet-browser-6f7c23fd28ef37ae51478b735c1f5888c97bbaf5.tar.zst
tangerine-wallet-browser-6f7c23fd28ef37ae51478b735c1f5888c97bbaf5.zip
Merge branch 'dev' into TxManager
Diffstat (limited to 'test/unit/idStore-migration-test.js')
-rw-r--r--test/unit/idStore-migration-test.js31
1 files changed, 5 insertions, 26 deletions
diff --git a/test/unit/idStore-migration-test.js b/test/unit/idStore-migration-test.js
index 639eb0d72..c4a3f3ae4 100644
--- a/test/unit/idStore-migration-test.js
+++ b/test/unit/idStore-migration-test.js
@@ -21,6 +21,10 @@ const mockVault = {
account: '0x5d8de92c205279c10e5669f797b853ccef4f739a',
}
+const badVault = {
+ seed: 'radar blur cabbage chef fix engine embark joy scheme fiction master release',
+}
+
describe('IdentityStore to KeyringController migration', function() {
// The stars of the show:
@@ -83,33 +87,8 @@ describe('IdentityStore to KeyringController migration', function() {
keyringController.configManager.setWallet('something')
const state = keyringController.getState()
assert(state.isInitialized, 'old vault counted as initialized.')
+ assert.equal(state.lostAccounts.length, 0, 'no lost accounts')
})
-
- /*
- it('should use the password to migrate the old vault', function(done) {
- this.timeout(5000)
- console.log('calling submitPassword')
- console.dir(keyringController)
- keyringController.submitPassword(password, function (err, state) {
- assert.ifError(err, 'submitPassword threw error')
-
- function log(str, dat) { console.log(str + ': ' + JSON.stringify(dat)) }
-
- let newAccounts = keyringController.getAccounts()
- log('new accounts: ', newAccounts)
-
- let newAccount = ethUtil.addHexPrefix(newAccounts[0])
- assert.equal(ethUtil.addHexPrefix(newAccount), mockVault.account, 'restored the correct account')
- const newSeed = keyringController.keyrings[0].mnemonic
- log('keyringController keyrings', keyringController.keyrings)
- assert.equal(newSeed, mockVault.seed, 'seed phrase transferred.')
-
- assert(configManager.getVault(), 'new type of vault is persisted')
- done()
- })
- })
- */
-
})
})