Skip to content

Commit

Permalink
Merge pull request bitpay#399 from isocolsky/fix/derivation-strategy
Browse files Browse the repository at this point in the history
restore derivation strategy on txps
  • Loading branch information
matiu committed Nov 11, 2015
2 parents c1f5f48 + fa58b5b commit 28c06e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/model/txproposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ TxProposal.create = function(opts) {
x.proposalSignaturePubKey = opts.proposalSignaturePubKey;
x.proposalSignaturePubKeySig = opts.proposalSignaturePubKeySig;
x.addressType = opts.addressType || Constants.SCRIPT_TYPES.P2SH;
x.derivationStrategy = opts.derivationStrategy || Constants.DERIVATION_STRATEGIES.BIP45;
x.customData = opts.customData;

if (_.isFunction(TxProposal._create[x.type])) {
Expand Down Expand Up @@ -127,6 +128,7 @@ TxProposal.fromObj = function(obj) {
x.proposalSignaturePubKey = obj.proposalSignaturePubKey;
x.proposalSignaturePubKeySig = obj.proposalSignaturePubKeySig;
x.addressType = obj.addressType || Constants.SCRIPT_TYPES.P2SH;
x.derivationStrategy = obj.derivationStrategy || Constants.DERIVATION_STRATEGIES.BIP45;
x.customData = obj.customData;

return x;
Expand Down
1 change: 1 addition & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,7 @@ WalletService.prototype.createTx = function(opts, cb) {
walletN: wallet.n,
excludeUnconfirmedUtxos: !!opts.excludeUnconfirmedUtxos,
addressType: wallet.addressType,
derivationStrategy: wallet.derivationStrategy,
customData: opts.customData,
};

Expand Down

0 comments on commit 28c06e0

Please sign in to comment.