Fixes import & export with new encryption
This commit is contained in:
parent
1b0f6836dc
commit
35bab383b0
12 changed files with 86 additions and 67 deletions
|
|
@ -249,7 +249,7 @@ describe('Identity model', function() {
|
|||
|
||||
var fakeCrypto = {
|
||||
kdf: sinon.stub().returns('passphrase'),
|
||||
decrypt: sinon.stub().returns({walletId:123}),
|
||||
decrypt: sinon.stub().returns('{"walletId":123}'),
|
||||
};
|
||||
|
||||
var opts = {
|
||||
|
|
@ -258,7 +258,7 @@ describe('Identity model', function() {
|
|||
};
|
||||
|
||||
Identity.create(args.params, function(err, iden) {
|
||||
iden.importWallet(123,'password', opts, function(err){
|
||||
iden.importEncryptedWallet(123,'password', opts, function(err){
|
||||
should.not.exist(err);
|
||||
fakeCrypto.kdf.getCall(0).args[0].should.equal('password');
|
||||
fakeCrypto.decrypt.getCall(0).args[0].should.equal('passphrase');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue