From 8b4a946497ded19d59e38ce5c9c3aa30eb777a86 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 26 Mar 2015 17:52:59 -0300 Subject: [PATCH] add payproUrl to model --- lib/model/txproposal.js | 2 ++ lib/server.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/model/txproposal.js b/lib/model/txproposal.js index 2f6ca79..025ada5 100644 --- a/lib/model/txproposal.js +++ b/lib/model/txproposal.js @@ -24,6 +24,7 @@ TxProposal.create = function(opts) { x.toAddress = opts.toAddress; x.amount = opts.amount; x.message = opts.message; + x.payProUrl = opts.payProUrl; x.proposalSignature = opts.proposalSignature; x.changeAddress = opts.changeAddress; x.inputs = []; @@ -48,6 +49,7 @@ TxProposal.fromObj = function(obj) { x.toAddress = obj.toAddress; x.amount = obj.amount; x.message = obj.message; + x.payProUrl = obj.payProUrl; x.proposalSignature = obj.proposalSignature; x.changeAddress = obj.changeAddress; x.inputs = obj.inputs; diff --git a/lib/server.js b/lib/server.js index dc43cc4..6a2ebaa 100644 --- a/lib/server.js +++ b/lib/server.js @@ -557,7 +557,7 @@ WalletService.prototype.createTx = function(opts, cb) { if (!wallet.isComplete()) return cb(new ClientError('Wallet is not complete')); var copayer = wallet.getCopayer(self.copayerId); - var hash = WalletUtils.getProposalHash(opts.toAddress, opts.amount, opts.message); + var hash = WalletUtils.getProposalHash(opts.toAddress, opts.amount, opts.message, opts.payProUrl); if (!self._verifySignature(hash, opts.proposalSignature, copayer.requestPubKey)) return cb(new ClientError('Invalid proposal signature'));