Fix resume event on mobile for Glidera/Coinbase integration (#4083)
This commit is contained in:
parent
2a0cecd911
commit
4a8e5397ce
4 changed files with 13 additions and 7 deletions
|
|
@ -3,6 +3,8 @@
|
|||
angular.module('copayApp.controllers').controller('coinbaseController',
|
||||
function($rootScope, $scope, $timeout, $modal, profileService, configService, storageService, coinbaseService, isChromeApp, animationService, lodash, nodeWebkit) {
|
||||
|
||||
window.ignoreMobilePause = true;
|
||||
|
||||
this.openAuthenticateWindow = function() {
|
||||
var oauthUrl = this.getAuthenticateUrl();
|
||||
if (!nodeWebkit.isDefined()) {
|
||||
|
|
|
|||
|
|
@ -17,14 +17,16 @@ angular.module('copayApp.controllers').controller('coinbaseUriController',
|
|||
$scope.$apply();
|
||||
}, 100);
|
||||
}
|
||||
else if (data && data.access_token) {
|
||||
else if (data && data.access_token && data.refresh_token) {
|
||||
storageService.setCoinbaseToken(network, data.access_token, function() {
|
||||
storageService.setCoinbaseRefreshToken(network, data.refresh_token, function() {
|
||||
$scope.$emit('Local/CoinbaseUpdated', data.access_token);
|
||||
$timeout(function() {
|
||||
go.path('coinbase');
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
angular.module('copayApp.controllers').controller('glideraController',
|
||||
function($rootScope, $scope, $timeout, $modal, profileService, configService, storageService, glideraService, isChromeApp, animationService, lodash) {
|
||||
|
||||
window.ignoreMobilePause = true;
|
||||
|
||||
this.getAuthenticateUrl = function() {
|
||||
return glideraService.getOauthCodeUrl();
|
||||
|
|
|
|||
|
|
@ -356,7 +356,8 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $
|
|||
root.getPendingTransactions = function(cb) {
|
||||
var network = configService.getSync().coinbase.testnet ? 'testnet' : 'livenet';
|
||||
storageService.getCoinbaseTxs(network, function(err, txs) {
|
||||
return cb(err, JSON.parse(txs));
|
||||
var _txs = txs ? JSON.parse(txs) : {};
|
||||
return cb(err, _txs);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue