aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-23 07:54:51 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-23 07:54:51 +0800
commitde8da9ddf67f36977e43d2168c4847fd9923c875 (patch)
treed6a417d1adea9a6e29a21950603e012e8d357741 /test
parent2966d46fa29641ad478cc83b5ee4c6c8adf1c63b (diff)
downloadtangerine-wallet-browser-de8da9ddf67f36977e43d2168c4847fd9923c875.tar
tangerine-wallet-browser-de8da9ddf67f36977e43d2168c4847fd9923c875.tar.gz
tangerine-wallet-browser-de8da9ddf67f36977e43d2168c4847fd9923c875.tar.bz2
tangerine-wallet-browser-de8da9ddf67f36977e43d2168c4847fd9923c875.tar.lz
tangerine-wallet-browser-de8da9ddf67f36977e43d2168c4847fd9923c875.tar.xz
tangerine-wallet-browser-de8da9ddf67f36977e43d2168c4847fd9923c875.tar.zst
tangerine-wallet-browser-de8da9ddf67f36977e43d2168c4847fd9923c875.zip
Simplify Encryptor API Surface
At least, the portion of it that we use. Moved salting within the encryptor, so it does not need to be managed externally. KeyringController now caches the password instead of a passwordDerivedKey, since it is ignorant of the salt. Encryptor payload is now in a JSON format, so its portions are both base64 encoded *and* labeled appropriately. The format is `{ "data": "0x0", "iv": "0x0", "salt": "string" }`. Fixes #843 Fixes #859
Diffstat (limited to 'test')
-rw-r--r--test/unit/keyring-controller-test.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/unit/keyring-controller-test.js b/test/unit/keyring-controller-test.js
index 437441e0e..c32141cc6 100644
--- a/test/unit/keyring-controller-test.js
+++ b/test/unit/keyring-controller-test.js
@@ -82,13 +82,15 @@ describe('KeyringController', function() {
})
- describe('#migrateAndGetKey', function() {
+ describe('#migrateOldVaultIfAny', function() {
it('should return the key for that password', function(done) {
- keyringController.migrateAndGetKey(password)
- .then((key) => {
- assert(key, 'a key is returned')
+ keyringController.migrateOldVaultIfAny(password)
+ .then(() => {
done()
})
+ .catch((reason) => {
+ assert.ifError(reason)
+ })
})
})