Merge pull request #1598 from cmgustavo/feature/identity-compat01

Display a message for users whose have wallet:: but not profile::
This commit is contained in:
Matias Alejo Garcia 2014-10-30 10:00:32 -03:00
commit 02ab30610f
7 changed files with 94 additions and 8 deletions

View file

@ -166,14 +166,32 @@ Wallet.COPAYER_PAIR_LIMITS = {
12: 1,
};
Wallet.getStoragePrefix = function() {
return 'wallet::';
};
Wallet.getStorageKey = function(str) {
return 'wallet::' + str;
return Wallet.getStoragePrefix() + str;
};
Wallet.prototype.getStorageKey = function() {
return Wallet.getStorageKey(this.getId());
};
/**
* check if any wallet exists on storage
* @param opts.storageOpts
* @param cb
*/
Wallet.checkIfExistsAny = function(opts, cb) {
var storage = opts.storage || opts.pluginManager.get('DB');
storage.getFirst(Wallet.getStoragePrefix(), {
onlyKey: true
}, function(err, v, k) {
return cb(k ? true : false);
});
};
/* for stubbing */
Wallet._newInsight = function(opts) {
return new Insight(opts);