diff --git a/src/js/ripple/remote.js b/src/js/ripple/remote.js index 9a197be2..85c715b9 100644 --- a/src/js/ripple/remote.js +++ b/src/js/ripple/remote.js @@ -46,6 +46,7 @@ var log = require('./log').internal.sub('remote'); max_fee : Maximum acceptable transaction fee fee_cushion : Extra fee multiplier to account for async fee changes. servers : Array of server objects with the following form + canonical_signing : Signatures should be canonicalized and the "canonical" flag set { host: @@ -82,6 +83,7 @@ function Remote(opts, trace) { this.local_sequence = Boolean(opts.local_sequence); // Locally track sequence numbers this.local_fee = (typeof opts.local_fee === 'undefined') ? true : opts.local_fee; // Locally set fees this.local_signing = (typeof opts.local_signing === 'undefined') ? true : opts.local_signing; + this.canonical_signing = (typeof opts.canonical_signing === 'undefined') ? true : opts.canonical_signing; this.fee_cushion = (typeof opts.fee_cushion === 'undefined') ? 1.2 : opts.fee_cushion; this.max_fee = (typeof opts.max_fee === 'undefined') ? Infinity : opts.max_fee; this.id = 0; diff --git a/src/js/ripple/transaction.js b/src/js/ripple/transaction.js index f275f9cc..6ea4055f 100644 --- a/src/js/ripple/transaction.js +++ b/src/js/ripple/transaction.js @@ -74,7 +74,8 @@ function Transaction(remote) { // Index at which transaction was submitted this.submitIndex = void(0); - this.canonical = true; + // Canonical signing setting defaults to the Remote's configuration + this.canonical = "object" === typeof remote ? !!remote.canonical_signing : true; // We aren't clever enough to eschew preventative measures so we keep an array // of all submitted transactionIDs (which can change due to load_factor