From 77ff48ebf206b105e194de2c5805fd43559bb66f Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 11 Mar 2013 03:04:22 -0700 Subject: [PATCH] JS: Make transaction signing not require remote. --- src/js/transaction.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/transaction.js b/src/js/transaction.js index 61eb541a1..ee82d0bb7 100644 --- a/src/js/transaction.js +++ b/src/js/transaction.js @@ -178,10 +178,11 @@ Transaction.prototype.set_state = function (state) { Transaction.prototype.complete = function () { var tx_json = this.tx_json; - if (this.remote.local_fee && undefined === tx_json.Fee) { + if (undefined === tx_json.Fee && this.remote.local_fee) { tx_json.Fee = Transaction.fees['default'].to_json(); } - if (this.remote.local_signing && undefined === tx_json.SigningPubKey) { + + if (undefined === tx_json.SigningPubKey && (!this.remote || this.remote.local_signing)) { var seed = Seed.from_json(this._secret); var key = seed.get_key(this.tx_json.Account); tx_json.SigningPubKey = key.to_hex_pub();