Merge pull request #1171 from chjj/paypro_disable

Tentative: Temporarily disable payment protocol.
This commit is contained in:
Matias Alejo Garcia 2014-08-26 10:07:12 -03:00
commit dea8d778ee

View file

@ -111,23 +111,26 @@ angular.module('copayApp.controllers').controller('SendController',
$rootScope.pendingPayment = null;
}
var uri;
if (address.indexOf('bitcoin:') === 0) {
uri = new bitcore.BIP21(address).data;
} else if (/^https?:\/\//.test(address)) {
uri = {
merchant: address
};
}
// XXX Payment Protocol is temporarily disabled.
// var uri;
// if (address.indexOf('bitcoin:') === 0) {
// uri = new bitcore.BIP21(address).data;
// } else if (/^https?:\/\//.test(address)) {
// uri = {
// merchant: address
// };
// }
//
// if (uri && uri.merchant) {
// w.createPaymentTx({
// uri: uri.merchant,
// memo: commentText
// }, done);
// } else {
// w.createTx(address, amount, commentText, done);
// }
if (uri && uri.merchant) {
w.createPaymentTx({
uri: uri.merchant,
memo: commentText
}, done);
} else {
w.createTx(address, amount, commentText, done);
}
w.createTx(address, amount, commentText, done);
// reset fields
$scope.address = $scope.amount = $scope.commentText = null;
@ -503,4 +506,9 @@ angular.module('copayApp.controllers').controller('SendController',
});
};
// XXX Payment Protocol is temporarily disabled.
$scope.onChanged = function() {
;
};
});