diff --git a/public/views/history.html b/public/views/history.html index a6cb99f8f..07d7d8071 100644 --- a/public/views/history.html +++ b/public/views/history.html @@ -2,16 +2,15 @@
- Getting transactions... - -
-
- -
- Could not fetch transaction history - -
- No transactions yet + Getting transactions... + + + Could not fetch transaction history + + + No transactions yet + +
@@ -30,7 +29,7 @@ + - - {{history.formatAmount(btx.amount)}} + {{btx.amountStr}} {{history.getUnitName()}} diff --git a/public/views/includes/clientError.html b/public/views/includes/clientError.html index 11365bf8d..de193f2cf 100644 --- a/public/views/includes/clientError.html +++ b/public/views/includes/clientError.html @@ -4,7 +4,7 @@
-

Connection error

+

Wallet Service Error

{{index.clientError.message || index.clientError}}
diff --git a/public/views/includes/offline.html b/public/views/includes/offline.html index b732ac84d..9e64e0cf3 100644 --- a/public/views/includes/offline.html +++ b/public/views/includes/offline.html @@ -5,7 +5,7 @@

{{'Could not connect to Wallet Service'|translate}}

-
{{'Trying to reconnnect...'|translate}}
+
{{'Trying to reconnnect...'|translate}}
diff --git a/public/views/walletHome.html b/public/views/walletHome.html index 206ffea38..0e5e82bac 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -2,20 +2,23 @@
-
+
- - {{index.totalBalanceStr || '...'}} + + {{index.totalBalanceStr }} - ...
-
- {{index.totalBalanceAlternative}} {{index.alternativeIsoCode}} - N/A +
+ Opening Wallet... + Updating Status... + Updating Balance... + Updating Pending Transactions... + Scanning Wallet funds... + Recreating Wallet on BWS...
-
-   +
+ {{index.totalBalanceAlternative}} {{index.alternativeIsoCode}}
@@ -41,13 +44,7 @@
-
- - Could not update Wallet - -
-
@@ -109,16 +106,6 @@ You can recreate it from the local information.
-
- Opening Wallet... - Updating Status... - Updating Balance... - Updating Pending Transactions... - Scanning Wallet funds... - Recreating Wallet on BWS... -
- -
diff --git a/src/css/main.css b/src/css/main.css index 16e9b9202..d04a4b59e 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -1137,3 +1137,4 @@ input.ng-invalid-match, input.ng-invalid-match:focus { .tx-details-blockchain li { cursor: pointer !important; } + diff --git a/src/css/mobile.css b/src/css/mobile.css index c2e8628e5..3c33d261e 100644 --- a/src/css/mobile.css +++ b/src/css/mobile.css @@ -154,6 +154,7 @@ _:-ms-fullscreen, :root .main { padding: 3rem 1rem; margin-bottom: 11px; color: #fff; + height: 175px; } .scroll-section { diff --git a/src/js/controllers/history.js b/src/js/controllers/history.js index 8c9660959..7dc20d6ec 100644 --- a/src/js/controllers/history.js +++ b/src/js/controllers/history.js @@ -9,7 +9,6 @@ angular.module('copayApp.controllers').controller('historyController', var fc = profileService.focusedClient; var config = configService.getSync().wallet.settings; - var formatAmount = profileService.formatAmount; this.unitToSatoshi = config.unitToSatoshi; this.satToUnit = 1 / this.unitToSatoshi; this.unitName = config.unitName; @@ -42,10 +41,9 @@ angular.module('copayApp.controllers').controller('historyController', this.openTxModal = function(btx) { var self = this; var fc = profileService.focusedClient; - var ModalInstanceCtrl = function($scope, $modalInstance, profileService) { + var ModalInstanceCtrl = function($scope, $modalInstance) { $scope.btx = btx; $scope.settings = config; - $scope.btx.amountStr = profileService.formatAmount(btx.amount); $scope.color = fc.backgroundColor; $scope.getAmount = function(amount) { @@ -73,11 +71,6 @@ angular.module('copayApp.controllers').controller('historyController', }); }; - - this.formatAmount = function(amount) { - return profileService.formatAmount(amount); - }; - this.hasAction = function(actions, action) { return actions.hasOwnProperty('create'); }; diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 4caac6035..9dc4a444e 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -15,9 +15,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r self[processName] = isOn; self.onGoingProcess[processName] = isOn; - // derived rules - self.hideBalance = self.updatingBalance || self.updatingStatus || self.openingWallet; - var name; self.anyOnGoingProcess = lodash.any(self.onGoingProcess, function(isOn, processName) { if (isOn) @@ -26,6 +23,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); // The first one self.onGoingProcessName = name; + $timeout(function() { + $rootScope.$apply(); + }); }; self.setFocusedWallet = function() { @@ -147,14 +147,14 @@ angular.module('copayApp.controllers').controller('indexController', function($r } self.skipHistory = skip || 0; $timeout(function() { - self.setOngoingProcess('updatingTxHistory', true); $log.debug('Updating Transaction History'); self.txHistoryError = false; + self.updatingTxHistory = true; fc.getTxHistory({ skip: self.skipHistory, limit: self.limitHistory + 1 }, function(err, txs) { - self.setOngoingProcess('updatingTxHistory', false); + self.updatingTxHistory = false; if (err) { $log.debug('TxHistory ERROR:', err); self.handleError(err); @@ -346,6 +346,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r self.notAuthorized = false; self.setOngoingProcess('recreating', false); + if (err) { + self.clientError = 'Could not recreate wallet:' + err; + $rootScope.$apply(); + return; + } + profileService.setWalletClients(); $timeout(function() { $rootScope.$emit('Local/WalletImported', self.walletId); @@ -375,6 +381,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r c.scanning = false; if (self.walletId == walletId) self.setOngoingProcess('scanning', false); + self.clientError = 'Could not scan wallet:' + err; + $rootScope.$apply(); } }); };