refactor on import wallet controllers
This commit is contained in:
parent
16e2194377
commit
45e44fba19
7 changed files with 105 additions and 144 deletions
|
|
@ -289,8 +289,8 @@ Identity.prototype.importWalletFromObj = function(obj, opts, cb) {
|
|||
var w = importFunction(obj, readOpts);
|
||||
if (!w) return cb(new Error('Could not decrypt'));
|
||||
|
||||
this._checkVersion(w.version);
|
||||
this.addWallet(w);
|
||||
self._checkVersion(w.version);
|
||||
self.addWallet(w);
|
||||
self.bindWallet(w);
|
||||
self.storeWallet(w, function(err) {
|
||||
if (err) return cb(err);
|
||||
|
|
|
|||
|
|
@ -2487,7 +2487,8 @@ Wallet.prototype.createTxSync = function(toAddress, amountSatStr, comment, utxos
|
|||
};
|
||||
|
||||
/**
|
||||
* @desc Updates all the indexes for the current publicKeyRing
|
||||
* @desc Updates all the indexes for the current publicKeyRing. This scans
|
||||
* the blockchain looking for transactions on derived addresses.
|
||||
*
|
||||
* Triggers a wallet {@link Wallet#store} call
|
||||
* @param {Function} callback - called when all indexes have been updated. Receives an error, if any, as first argument
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue