Merge pull request #3255 from cmgustavo/feat/non-backwards-compatible-uri
Adds non-backwards compatibility uri for payment protocol
This commit is contained in:
commit
504a8b10dd
1 changed files with 29 additions and 19 deletions
|
|
@ -1021,6 +1021,15 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
|
|
||||||
var satToUnit = 1 / this.unitToSatoshi;
|
var satToUnit = 1 / this.unitToSatoshi;
|
||||||
|
|
||||||
|
// URI extensions for Payment Protocol with non-backwards-compatible request
|
||||||
|
if ((/^bitcoin:\?r=[\w+]/).exec(uri)) {
|
||||||
|
uri = decodeURIComponent(uri.replace('bitcoin:?r=', ''));
|
||||||
|
this.setFromPayPro(uri, function(err) {
|
||||||
|
if (err) {
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
uri = sanitizeUri(uri);
|
uri = sanitizeUri(uri);
|
||||||
|
|
||||||
if (!bitcore.URI.isValid(uri)) {
|
if (!bitcore.URI.isValid(uri)) {
|
||||||
|
|
@ -1046,6 +1055,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
this.setForm(addr, amount, message);
|
this.setForm(addr, amount, message);
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue