From 86027e96688dde95fc75deb7883f24dec919222d Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 25 Jun 2016 13:24:30 -0700 Subject: [PATCH] wallet: unlock key last. --- lib/bcoin/wallet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/wallet.js b/lib/bcoin/wallet.js index 94ce3ae3..ffd2b828 100644 --- a/lib/bcoin/wallet.js +++ b/lib/bcoin/wallet.js @@ -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);