refactor bitpay card

This commit is contained in:
Matias Alejo Garcia 2017-01-27 17:54:41 -03:00
commit 19b3d9bb15
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
11 changed files with 242 additions and 261 deletions

View file

@ -43,16 +43,17 @@ angular.module('copayApp.services')
};
root.set = function(k, v, cb) {
if (lodash.isObject(v)) {
v = JSON.stringify(v);
}
if (v && !lodash.isString(v)) {
v = v.toString();
}
if (isChromeApp || isNW) {
var obj = {};
if (lodash.isObject(v)) {
v = JSON.stringify(v);
}
if (!lodash.isString(v)) {
v = v.toString();
}
obj[k] = v;
chrome.storage.local.set(obj, cb);
@ -60,7 +61,6 @@ angular.module('copayApp.services')
ls.setItem(k, v);
return cb();
}
};
root.remove = function(k, cb) {