Glidera Integration

This commit is contained in:
Gustavo Maximiliano Cortez 2015-08-28 18:23:24 -03:00
commit 4ed39a22d4
8 changed files with 314 additions and 0 deletions

View file

@ -113,6 +113,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.pendingTxProposalsCountForUs = null;
self.setSpendUnconfirmed();
self.glideraToken = null;
$timeout(function() {
self.hasProfile = true;
self.noFocusedWallet = false;
@ -134,6 +136,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.copayers = [];
self.updateColor();
self.updateAlias();
self.initGlidera();
storageService.getBackupFlag(self.walletId, function(err, val) {
self.needsBackup = self.network == 'testnet' ? false : !val;
@ -843,6 +846,13 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}), 'name');
};
self.initGlidera = function() {
storageService.getGlideraToken(self.network, function(err, val) {
if (err) return;
self.glideraToken = val;
});
};
// UX event handlers
$rootScope.$on('Local/ColorUpdated', function(event) {
self.updateColor();
@ -892,6 +902,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
});
$rootScope.$on('Local/GlideraTokenUpdated', function() {
self.initGlidera();
});
$rootScope.$on('Local/UnitSettingUpdated', function(event) {
self.updateAll();
self.updateTxHistory();