add setFromObj to FakeStorage - and fix publicKeyring capitalization

...to fix tests
This commit is contained in:
Ryan X. Charles 2014-04-17 18:55:17 -03:00
commit 4681783231
3 changed files with 10 additions and 2 deletions

View file

@ -48,11 +48,13 @@ WalletFactory.prototype._checkRead = function(walletId) {
};
WalletFactory.prototype.read = function(walletId) {
if (! this._checkRead(walletId)) return false;
if (! this._checkRead(walletId))
throw Error('Check read failed');
var s = this.storage;
var opts = s.get(walletId, 'opts');
opts.id = walletId;
opts.publicKeyRing = new PublicKeyRing.fromObj(s.get(walletId, 'publicKeyRing'));
opts.txProposals = new TxProposals.fromObj(s.get(walletId, 'txProposals'));
opts.privateKey = new PrivateKey.fromObj(s.get(walletId, 'privateKey'));