paypro: fix parseBitcoinURI. start using bitcoin uris in tests.

This commit is contained in:
Christopher Jeffrey 2014-07-29 11:14:07 -07:00 committed by Manuel Araoz
commit e0ff9ca6bd
3 changed files with 21 additions and 4 deletions

View file

@ -86,8 +86,10 @@ angular.module('copayApp.controllers').controller('SendController',
$rootScope.pendingPayment = null;
}
if (~address.indexOf('://')) {
w.createTx(address, commentText, done);
var uri = address.indexOf('bitcoin:') === 0
&& copay.Structure.parseBitcoinURI(address);
if (uri && uri.merchant) {
w.createTx(uri.merchant, commentText, done);
} else {
w.createTx(address, amount, commentText, done);
}