better handing of errors + prevent joining the same wallet more that once

This commit is contained in:
Matias Alejo Garcia 2015-08-12 11:08:33 -03:00
commit 033f7c163f
7 changed files with 167 additions and 79 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettextCatalog, gettext, amMoment, nodeWebkit, addonManager, feeService, isChromeApp) {
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettextCatalog, gettext, amMoment, nodeWebkit, addonManager, feeService, isChromeApp, bwsError) {
var self = this;
self.isCordova = isCordova;
self.onGoingProcess = {};
@ -243,7 +243,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.updateError = false;
return fc.getStatus(function(err, ret) {
if (err) {
self.updateError = true;
self.updateError = bwsError.msg(err, 'Could not update Wallet');
} else {
if (!opts.quiet)
self.setOngoingProcess('scanning', ret.wallet.scanning);