From f59256c73ed65990c54b67b4c745a69c104b23f4 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Tue, 7 Feb 2017 14:54:30 -0300 Subject: [PATCH] Fix URL handler for desktop --- src/js/services/openURL.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/services/openURL.js b/src/js/services/openURL.js index ff01dc78c..7c1af7417 100644 --- a/src/js/services/openURL.js +++ b/src/js/services/openURL.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.services').factory('openURLService', function($rootScope, $ionicHistory, $document, $log, $state, platformInfo, lodash, profileService, incomingData) { +angular.module('copayApp.services').factory('openURLService', function($rootScope, $ionicHistory, $document, $log, $state, platformInfo, lodash, profileService, incomingData, appConfigService) { var root = {}; var handleOpenURL = function(args) { @@ -61,10 +61,10 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop handleOpenURL({ url: pathData.substring(pathData.indexOf('bitcoin:')) }); - } else if (pathData.indexOf('copay:') != -1) { - $log.debug('Copay URL found'); + } else if (pathData.indexOf(appConfigService.name + '://') != -1) { + $log.debug(appConfigService.name + ' URL found'); handleOpenURL({ - url: pathData.substring(pathData.indexOf('copay:')) + url: pathData.substring(pathData.indexOf(appConfigService.name + '://')) }); } });