mirror of https://github.com/BTCPrivate/copay.git
commit
8d0743a948
|
@ -3,12 +3,24 @@ var FakeStorage = function(){
|
||||||
this.storage = {};
|
this.storage = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
FakeStorage.prototype.set = function (id, payload) {
|
FakeStorage.prototype.setGlobal = function (id, payload) {
|
||||||
this.storage[id] = payload;
|
this.storage[id] = payload;
|
||||||
};
|
};
|
||||||
|
|
||||||
FakeStorage.prototype.get = function(id) {
|
FakeStorage.prototype.getGlobal = function(id) {
|
||||||
return this.storage[id];
|
return this.storage[id];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FakeStorage.prototype.set = function (wid, id, payload) {
|
||||||
|
this.storage[wid + '-' + id] = payload;
|
||||||
|
};
|
||||||
|
|
||||||
|
FakeStorage.prototype.get = function(wid, id) {
|
||||||
|
return this.storage[wid + '-' +id];
|
||||||
|
}
|
||||||
|
|
||||||
|
FakeStorage.prototype.clear = function() {
|
||||||
|
delete this['storage'];
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = require('soop')(FakeStorage);
|
module.exports = require('soop')(FakeStorage);
|
||||||
|
|
|
@ -9,9 +9,6 @@ var Wallet = require('soop').load('../js/models/core/Wallet', {
|
||||||
Blockchain: copay.Insight
|
Blockchain: copay.Insight
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(Wallet);
|
|
||||||
|
|
||||||
|
|
||||||
describe('Wallet model', function() {
|
describe('Wallet model', function() {
|
||||||
var config = {
|
var config = {
|
||||||
wallet: {
|
wallet: {
|
||||||
|
|
Loading…
Reference in New Issue