diff --git a/public/index.html b/public/index.html index 4d55c0075..466f32077 100644 --- a/public/index.html +++ b/public/index.html @@ -27,8 +27,6 @@
-
-
diff --git a/public/views/history.html b/public/views/history.html index a9ea5e970..e69de29bb 100644 --- a/public/views/history.html +++ b/public/views/history.html @@ -1 +0,0 @@ -
diff --git a/public/views/includes/clientError.html b/public/views/includes/clientError.html index de193f2cf..e69de29bb 100644 --- a/public/views/includes/clientError.html +++ b/public/views/includes/clientError.html @@ -1,11 +0,0 @@ -
-
-
- -
-
-

Wallet Service Error

-
{{index.clientError.message || index.clientError}}
-
-
-
diff --git a/public/views/walletHome.html b/public/views/walletHome.html index a05dad2e8..5ce10b389 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -58,10 +58,11 @@
- Updating Wallet... - Updating Status... - Updating Wallet... - Updating Wallet... + Updating Wallet... Scanning Wallet funds... Recreating Wallet... @@ -343,7 +344,7 @@ history Could not fetch transaction history -
[Tap to retry] +
Tap to retry
No transactions yet diff --git a/src/css/main.css b/src/css/main.css index d41667a74..8e5e605eb 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -1115,7 +1115,7 @@ input.ng-invalid-match, input.ng-invalid-match:focus { top:auto; left:0; right:0; - bottom:90px; + bottom:200px; margin: auto; border-radius: 3px; color: #fff; diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index d2b241eda..1a5ca6f1a 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -72,7 +72,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r self.alternativeBalanceAvailable = false; self.totalBalanceAlternative = null; self.notAuthorized = false; - self.clientError = null; self.txHistory = []; self.txHistoryPaging = false; @@ -411,17 +410,27 @@ angular.module('copayApp.controllers').controller('indexController', function($r }; + self.clientError = function (err) { + if (isCordova) { + navigator.notification.confirm( + err, + function() {}, + 'Wallet Server Error', ['OK'] + ); + } else { + alert(err); + } + }; self.recreate = function(cb) { var fc = profileService.focusedClient; self.setOngoingProcess('recreating', true); - self.clientError = null; fc.recreateWallet(function(err) { self.notAuthorized = false; self.setOngoingProcess('recreating', false); if (err) { - self.clientError = 'Could not recreate wallet:' + err; + self.clientError('Could not recreate wallet:' + err); $rootScope.$apply(); return; } @@ -458,7 +467,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r if (err) { if (self.walletId == walletId) self.setOngoingProcess('scanning', false); - self.clientError = 'Could not scan wallet:' + err; + self.clientError = ('Could not scan wallet:' + err); $rootScope.$apply(); } }); @@ -522,7 +531,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r $rootScope.$on(eventName, function(event) { $log.debug('### Online event'); self.isOffline = false; - self.clientError = null; self.updateAll(); self.updateTxHistory(); }); @@ -544,7 +552,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); $rootScope.$on('Local/BWSNotFound', function(event) { - self.clientError = 'Could not access to Bitcore Wallet Service: Service not found'; + self.clientError('Could not access to Bitcore Wallet Service: Service not found'); $rootScope.$apply(); }); @@ -557,7 +565,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r } else if (err.code === 'ETIMEDOUT') { $log.debug('Time out:', err); } else { - self.clientError = err; + self.clientError(err && err.message ? 'Error at Bitcore Wallet Service:' + err.message : err); } $rootScope.$apply(); }); @@ -627,7 +635,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r $timeout(function() { self.hasProfile = true; self.noFocusedWallet = true; - self.clientError = null; self.isComplete = null; self.walletName = null; go.addWallet();