Fix regex

This commit is contained in:
Gustavo Maximiliano Cortez 2017-09-09 19:23:46 -03:00
commit 0c67f02754
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 7 additions and 7 deletions

View file

@ -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[cash]*:/) != -1) {
if (pathData.indexOf(/^bitcoin(cash)?:/) != -1) {
$log.debug('Bitcoin URL found');
handleOpenURL({
url: pathData.substring(pathData.indexOf(/^bitcoin[cash]*:/))
url: pathData.substring(pathData.indexOf(/^bitcoin(cash)?:/))
});
} else if (pathData.indexOf(appConfigService.name + '://') != -1) {
$log.debug(appConfigService.name + ' URL found');