Fix uri handler for coinbase

This commit is contained in:
Gustavo Maximiliano Cortez 2017-01-03 12:43:08 -03:00
commit 5301d1e9a9
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
7 changed files with 27 additions and 24 deletions

View file

@ -61,7 +61,7 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $
+ 'wallet:payment-methods:read';
// NW has a bug with Window Object
if (isCordova && isNW) {
if (isCordova || isNW) {
credentials.REDIRECT_URI = coinbase.redirect_uri.mobile;
} else {
credentials.REDIRECT_URI = coinbase.redirect_uri.desktop;

View file

@ -126,9 +126,16 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
url: data
});
} else if (data && data.indexOf(appConfigService.name + '://coinbase') === 0) {
return $state.go('uricoinbase', {
url: data
var code = getParameterByName('code', data);
$state.go('tabs.home', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.home' ? false : true
}).then(function() {
$state.transitionTo('tabs.buyandsell.coinbase', {
code: code
});
});
return true;
// BitPayCard Authentication
} else if (data && data.indexOf(appConfigService.name + '://') === 0) {