Merge pull request #5578 from cmgustavo/bug/handle-url-desktop
Fix URL handler for desktop
This commit is contained in:
commit
2d05e05e31
1 changed files with 4 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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 root = {};
|
||||||
|
|
||||||
var handleOpenURL = function(args) {
|
var handleOpenURL = function(args) {
|
||||||
|
|
@ -61,10 +61,10 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop
|
||||||
handleOpenURL({
|
handleOpenURL({
|
||||||
url: pathData.substring(pathData.indexOf('bitcoin:'))
|
url: pathData.substring(pathData.indexOf('bitcoin:'))
|
||||||
});
|
});
|
||||||
} else if (pathData.indexOf('copay:') != -1) {
|
} else if (pathData.indexOf(appConfigService.name + '://') != -1) {
|
||||||
$log.debug('Copay URL found');
|
$log.debug(appConfigService.name + ' URL found');
|
||||||
handleOpenURL({
|
handleOpenURL({
|
||||||
url: pathData.substring(pathData.indexOf('copay:'))
|
url: pathData.substring(pathData.indexOf(appConfigService.name + '://'))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue