balance Service
This commit is contained in:
parent
a8f0401e8e
commit
57299d675e
31 changed files with 585 additions and 645 deletions
|
|
@ -172,11 +172,7 @@ Identity.prototype.retrieveWalletFromStorage = function(walletId, opts, callback
|
|||
blockchainOpts: self.blockchainOpts,
|
||||
skipFields: []
|
||||
};
|
||||
|
||||
return callback(null, importFunction(walletData, readOpts));
|
||||
|
||||
} catch (e) {
|
||||
|
||||
log.debug("ERROR: ", e.message);
|
||||
if (e && e.message && e.message.indexOf('MISSOPTS') !== -1) {
|
||||
return callback(new Error('WERROR: Could not read: ' + walletId + ': ' + e.message));
|
||||
|
|
@ -184,6 +180,7 @@ Identity.prototype.retrieveWalletFromStorage = function(walletId, opts, callback
|
|||
return callback(e);
|
||||
}
|
||||
}
|
||||
return callback(null, importFunction(walletData, readOpts));
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -564,6 +561,9 @@ Identity.prototype.listWallets = function() {
|
|||
Identity.prototype.deleteWallet = function(walletId, cb) {
|
||||
var self = this;
|
||||
|
||||
var w = this.getWalletById(walletId);
|
||||
w.close();
|
||||
|
||||
delete this.wallets[walletId];
|
||||
this.storage.removeItem(Wallet.getStorageKey(walletId), function(err) {
|
||||
if (err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue