Average confirmation time: {{fee.nbBlocks * 10}} minutes.
diff --git a/public/views/preferencesGlobal.html b/public/views/preferencesGlobal.html
index fd296396c..2b80961e5 100644
--- a/public/views/preferencesGlobal.html
+++ b/public/views/preferencesGlobal.html
@@ -78,7 +78,7 @@
About Copay
-
+
Push notifications for Copay are currently disabled. Enable them in the Settings app.
- Open Settings app
diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js
index 0718a29bf..9a2061648 100644
--- a/src/js/controllers/index.js
+++ b/src/js/controllers/index.js
@@ -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() {
diff --git a/src/js/controllers/preferencesGlobal.js b/src/js/controllers/preferencesGlobal.js
index 8cedfe62b..ba56f5223 100644
--- a/src/js/controllers/preferencesGlobal.js
+++ b/src/js/controllers/preferencesGlobal.js
@@ -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;
});
diff --git a/src/js/routes.js b/src/js/routes.js
index 222f45f26..134bca2e7 100644
--- a/src/js/routes.js
+++ b/src/js/routes.js
@@ -78,7 +78,6 @@ angular
$stateProvider
.state('translators', {
url: '/translators',
- walletShouldBeComplete: true,
needProfile: true,
views: {
'main': {
@@ -194,7 +193,6 @@ angular
})
.state('preferencesLanguage', {
url: '/preferencesLanguage',
- walletShouldBeComplete: true,
needProfile: true,
views: {
'main': {
@@ -205,7 +203,6 @@ angular
.state('preferencesUnit', {
url: '/preferencesUnit',
templateUrl: 'views/preferencesUnit.html',
- walletShouldBeComplete: true,
needProfile: true,
views: {
'main': {
@@ -216,7 +213,6 @@ angular
.state('preferencesFee', {
url: '/preferencesFee',
templateUrl: 'views/preferencesFee.html',
- walletShouldBeComplete: true,
needProfile: true,
views: {
'main': {
@@ -298,7 +294,6 @@ angular
.state('preferencesAltCurrency', {
url: '/preferencesAltCurrency',
templateUrl: 'views/preferencesAltCurrency.html',
- walletShouldBeComplete: true,
needProfile: true,
views: {
'main': {
@@ -389,7 +384,6 @@ angular
.state('about', {
url: '/about',
templateUrl: 'views/preferencesAbout.html',
- walletShouldBeComplete: true,
needProfile: true,
views: {
'main': {
@@ -400,7 +394,6 @@ angular
.state('logs', {
url: '/logs',
templateUrl: 'views/preferencesLogs.html',
- walletShouldBeComplete: true,
needProfile: true,
views: {
'main': {
@@ -534,7 +527,7 @@ angular
}
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
- $log.debug('Route change from:', fromState.name || '-', ' to:', toState.name);
+ $log.debug('Route change from:', fromState.name || '-', ' to:', toState.name);
if (!profileService.profile && toState.needProfile) {
diff --git a/src/js/services/feeService.js b/src/js/services/feeService.js
index 280621896..72cc38245 100644
--- a/src/js/services/feeService.js
+++ b/src/js/services/feeService.js
@@ -1,6 +1,6 @@
'use strict';
-angular.module('copayApp.services').factory('feeService', function($log, profileService, configService, gettextCatalog, lodash) {
+angular.module('copayApp.services').factory('feeService', function($log, bwcService, profileService, configService, gettextCatalog, lodash) {
var root = {};
// Constant fee options to translate
@@ -19,25 +19,32 @@ angular.module('copayApp.services').factory('feeService', function($log, profile
var feeLevel = root.getCurrentFeeLevel();
fc.getFeeLevels(fc.credentials.network, function(err, levels) {
- if (err)
- return cb({message: 'Could not get dynamic fee'});
+ if (err)
+ return cb({
+ message: 'Could not get dynamic fee'
+ });
- var feeLevelValue = lodash.find(levels, { level: feeLevel });
- if (!feeLevelValue || ! feeLevelValue.feePerKB)
- return cb({message: 'Could not get dynamic fee for level: ' + feeLevel});
+ var feeLevelValue = lodash.find(levels, {
+ level: feeLevel
+ });
+ if (!feeLevelValue || !feeLevelValue.feePerKB)
+ return cb({
+ message: 'Could not get dynamic fee for level: ' + feeLevel
+ });
var fee = feeLevelValue.feePerKB;
- $log.debug('Dynamic fee: ' + feeLevel + ' ' + fee + ' SAT');
- return cb(null, fee);
+ $log.debug('Dynamic fee: ' + feeLevel + ' ' + fee + ' SAT');
+ return cb(null, fee);
});
- };
+ };
+
+ root.getFeeLevels = function(cb) {
+ var walletClient = bwcService.getClient();
- root.getFeeLevels = function(cb) {
- var fc = profileService.focusedClient;
var unitName = configService.getSync().wallet.settings.unitName;
- fc.getFeeLevels('livenet', function(errLivenet, levelsLivenet) {
- fc.getFeeLevels('testnet', function(errTestnet, levelsTestnet) {
+ walletClient.getFeeLevels('livenet', function(errLivenet, levelsLivenet) {
+ walletClient.getFeeLevels('testnet', function(errTestnet, levelsTestnet) {
if (errLivenet || errTestnet) $log.debug('Could not get dynamic fee');
else {
for (var i = 0; i < 3; i++) {