JS: Fix local_fee for remote.js.

This commit is contained in:
Arthur Britto
2012-11-26 16:28:52 -08:00
parent 49ac818e28
commit 2bffd0d699

View File

@@ -1177,7 +1177,7 @@ Transaction.prototype.submit = function (callback) {
// YYY Might check paths for invalid accounts. // YYY Might check paths for invalid accounts.
if (this.local_fee && undefined === tx_json.Fee) { if (this.remote.local_fee && undefined === tx_json.Fee) {
if ('Payment' === tx_json.TransactionType if ('Payment' === tx_json.TransactionType
&& tx_json.Flags & Remote.flags.Payment.CreateAccount) { && tx_json.Flags & Remote.flags.Payment.CreateAccount) {
@@ -1349,7 +1349,7 @@ Transaction.prototype.set_flags = function (flags) {
} }
} }
if (this.local_fee && (this.tx_json.Flags & Remote.flags.Payment.CreateAccount)) if (this.remote.local_fee && (this.tx_json.Flags & Remote.flags.Payment.CreateAccount))
this.tx_json.Fee = Remote.fees.account_create.to_json(); this.tx_json.Fee = Remote.fees.account_create.to_json();
} }
@@ -1405,8 +1405,8 @@ Transaction.prototype.offer_create = function (src, taker_pays, taker_gets, expi
this.tx_json.TakerPays = Amount.json_rewrite(taker_pays); this.tx_json.TakerPays = Amount.json_rewrite(taker_pays);
this.tx_json.TakerGets = Amount.json_rewrite(taker_gets); this.tx_json.TakerGets = Amount.json_rewrite(taker_gets);
if (this.local_fee) { if (this.remote.local_fee) {
this.tx_json.Fee = Remote.fees.offer.to_json(); this.tx_json.Fee = Remote.fees.offer.to_json();
} }
if (expiration) if (expiration)