ref controllers

This commit is contained in:
Matias Alejo Garcia 2016-05-31 16:52:38 -03:00
commit cc2853e827
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
4 changed files with 166 additions and 159 deletions

View file

@ -1,12 +1,13 @@
'use strict';
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, latestReleaseService, bwcService, pushNotificationsService, lodash, go, profileService, configService, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, nodeWebkit, addonManager, bwsError, txFormatService, uxLanguage, glideraService, coinbaseService, platformInfo, addressbookService, walletService) {
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, latestReleaseService, bwcService, pushNotificationsService, lodash, go, profileService, configService, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, addonManager, bwsError, txFormatService, uxLanguage, glideraService, coinbaseService, platformInfo, addressbookService, walletService) {
var self = this;
var SOFT_CONFIRMATION_LIMIT = 12;
var errors = bwcService.getErrors();
var historyUpdateInProgress = {};
var isChromeApp = platformInfo.isChromeApp;
var isCordova = platformInfo.isCordova;
var isNW = platformInfo.isNW;
var ret = {};
ret.isCordova = isCordova;
@ -48,7 +49,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
ret.tab = 'walletHome';
var vanillaScope = ret;
if (nodeWebkit.isDefined()) {
if (isNW) {
latestReleaseService.checkLatestRelease(function(err, newRelease) {
if (err) {
$log.warn(err);
@ -741,7 +742,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$log.info('CSV generation not available in mobile');
return;
}
var isNode = nodeWebkit.isDefined();
var isNode = isNW;
var fc = profileService.focusedClient;
var c = fc.credentials;
if (!fc.isComplete()) return;

View file

@ -1,9 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('sidebarController',
function($rootScope, $timeout, lodash, profileService, configService, go, isMobile, isCordova) {
function($rootScope, $timeout, lodash, profileService, configService, go, platformInfo) {
var self = this;
self.isWindowsPhoneApp = isMobile.Windows() && isCordova;
self.isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
self.walletSelection = false;
// wallet list change