Fix fee levels when there is no wallet and hide Glidera if wallet is not complete (#4068)

* fix cordova is not define

* Remove focused client from fee level service

* remove wallet should be complete in route.js for global preferences routes

* get network of the focused client in getCurrentFeeValue function

* refactor

* do not show testnet fee levels in preference global and refactors

* bump new version bwc v2.2.1
This commit is contained in:
Gabriel Edgardo Bazán 2016-04-13 17:46:25 +02:00 committed by Gustavo Maximiliano Cortez
commit b720821d4e
8 changed files with 34 additions and 37 deletions

View file

@ -295,8 +295,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.updateAll = function(opts, initStatusHash, tries) {
tries = tries || 0;
opts = opts || {};
var fc = profileService.focusedClient;
if (!fc) return;
var walletId = profileService.focusedClient.credentials.walletId
var walletId = fc.credentials.walletId
if (opts.untilItChanges && lodash.isUndefined(initStatusHash)) {
initStatusHash = _walletStatusHash();
@ -321,10 +323,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}
};
var fc = profileService.focusedClient;
if (!fc) return;
// If not untilItChanges...trigger history update now
if (opts.triggerTxUpdate && !opts.untilItChanges) {
$timeout(function() {

View file

@ -15,8 +15,8 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
this.currentFeeLevel = feeService.getCurrentFeeLevel();
this.usePushNotifications = isCordova && !isMobile.Windows();
$scope.PNEnabledByUser = true;
$scope.isIOS = isMobile.iOS();
if (!typeof cordova.plugins.diagnostic != undefined && $scope.isIOS) {
$scope.isIOSApp = isMobile.iOS() && isCordova;
if ($scope.isIOSApp) {
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled;
});