new CopayPeer class. Peers working!

This commit is contained in:
Matias Alejo Garcia 2014-04-08 18:35:43 -03:00
commit fab2c8a505
7 changed files with 357 additions and 241 deletions

View file

@ -7,12 +7,20 @@ function Storage() {
}
Storage.prototype.get = function(k) {
return this.data[k];
return JSON.parse(localStorage.getItem(k));
};
Storage.prototype.set = function(k,v) {
this.data[k]=v;
localStorage.setItem(k, JSON.stringify(v));
};
Storage.prototype.remove = function(k) {
localStorage.removeItem(k);
};
Storage.prototype.clearAll = function() {
localStorage.clear();
};
module.exports = require('soop')(Storage);