paypro: remove old parse uri code. more debugging.

This commit is contained in:
Christopher Jeffrey 2014-07-30 17:20:50 -07:00 committed by Manuel Araoz
commit 7915008433
3 changed files with 16 additions and 21 deletions

View file

@ -15,6 +15,12 @@ angular.module('copayApp.directives')
var validator = function(value) {
// Is payment protocol address?
var uri = copay.HDPath.parseBitcoinURI(value);
var total = '00001000';
console.log('TOTAL:');
console.log(total);
var amount = angular.element(document).find('#amount');
amount.prop('disabled', true);
amount.val(total);
if (uri && uri.merchant) {
scope.wallet.createPaymentTx(uri.merchant, function(ntxid, ca) {
var txp = scope.wallet.txProposals.txps[ntxid];
@ -22,8 +28,7 @@ angular.module('copayApp.directives')
var total = txp.merchant.total;
console.log('TOTAL:');
console.log(total);
var sendForm = angular.element(document).find('[name=sendForm]');
var amount = angular.element(sendForm).find('#amount')
var amount = angular.element(document).find('#amount');
amount.prop('disabled', true);
amount.val(total);
});