Adds bitcoincash URL support
This commit is contained in:
parent
2e4c1d6abd
commit
823814817d
8 changed files with 45 additions and 26 deletions
|
|
@ -57,10 +57,10 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop
|
|||
|
||||
// This event is sent to an existent instance of Copay (only for standalone apps)
|
||||
gui.App.on('open', function(pathData) {
|
||||
if (pathData.indexOf('bitcoin:') != -1) {
|
||||
if (pathData.indexOf(/^bitcoin[cash]*:/) != -1) {
|
||||
$log.debug('Bitcoin URL found');
|
||||
handleOpenURL({
|
||||
url: pathData.substring(pathData.indexOf('bitcoin:'))
|
||||
url: pathData.substring(pathData.indexOf(/^bitcoin[cash]*:/))
|
||||
});
|
||||
} else if (pathData.indexOf(appConfigService.name + '://') != -1) {
|
||||
$log.debug(appConfigService.name + ' URL found');
|
||||
|
|
@ -84,6 +84,7 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop
|
|||
if (navigator.registerProtocolHandler) {
|
||||
$log.debug('Registering Browser handlers base:' + base);
|
||||
navigator.registerProtocolHandler('bitcoin', url, 'Copay Bitcoin Handler');
|
||||
navigator.registerProtocolHandler('web+bitcoincash', url, 'Copay Bitcoin Cash Handler');
|
||||
navigator.registerProtocolHandler('web+copay', url, 'Copay Wallet Handler');
|
||||
navigator.registerProtocolHandler('web+bitpay', url, 'BitPay Wallet Handler');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue