wallet: unlock key last.

This commit is contained in:
Christopher Jeffrey 2016-06-25 13:24:30 -07:00
parent 882b18e188
commit 86027e9668
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1008,11 +1008,11 @@ Wallet.prototype.sign = function sign(tx, options, callback) {
if (typeof options === 'string' || Buffer.isBuffer(options))
options = { passphrase: options };
this.master.toKey(options.passphrase, options.timeout, function(err, master) {
this.deriveInputs(tx, function(err, addresses) {
if (err)
return callback(err);
self.deriveInputs(tx, function(err, addresses) {
self.master.toKey(options.passphrase, options.timeout, function(err, master) {
if (err)
return callback(err);