From 035070b78bb4e3da1018f4d40c1585b0157bcb43 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 31 Jul 2014 11:31:52 -0700 Subject: [PATCH] paypro: drop existing txp check. --- js/controllers/send.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/js/controllers/send.js b/js/controllers/send.js index 3a48c33d2..429287947 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -89,30 +89,7 @@ angular.module('copayApp.controllers').controller('SendController', var uri = address.indexOf('bitcoin:') === 0 && copay.HDPath.parseBitcoinURI(address); if (uri.merchant) { - var existing; - - Object.keys(w.txProposals.txps).forEach(function(ntxid, i, obj) { - var txp = w.txProposals.txps[ntxid]; - if (!txp) return; - var total = typeof txp.merchant.total !== 'string' - ? txp.merchant.total.toString(10) - : txp.merchant.total; - if (txp.merchant.request_url === uri.merchant && total === amount) { - existing = txp; - obj.length = 0; - } - }); - - if (existing) { - var tx = existing.builder.build(); - if (!tx.isComplete()) { - $scope.sign(existing.getID()); - } else { - done(existing.getID(), existing.merchant.pr.ca); - } - } else { - w.createTx(uri.merchant, commentText, done); - } + w.createTx(uri.merchant, commentText, done); } else { w.createTx(address, amount, commentText, done); }