Merge pull request #5578 from cmgustavo/bug/handle-url-desktop

Fix URL handler for desktop
This commit is contained in:
Matias Alejo Garcia 2017-02-07 13:00:38 -05:00 committed by GitHub
commit 2d05e05e31
1 changed files with 4 additions and 4 deletions

View File

@ -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 + '://'))
});
}
});