show error message after click
This commit is contained in:
parent
6b65517383
commit
7540ee0a65
4 changed files with 45 additions and 33 deletions
|
|
@ -128,7 +128,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.isPrivKeyEncrypted = fc.isPrivKeyEncrypted();
|
||||
self.externalSource = fc.getPrivKeyExternalSourceName();
|
||||
self.account = fc.credentials.account;
|
||||
self.needsBackup = profileService.isBackupNeeded(self.walletId);
|
||||
|
||||
if (self.externalSource == 'trezor')
|
||||
self.account++;
|
||||
|
|
@ -153,16 +152,19 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
}
|
||||
}
|
||||
|
||||
self.openWallet(function() {
|
||||
if (!self.isComplete) {
|
||||
$log.debug('Wallet not complete after update... redirecting');
|
||||
go.path('copayers');
|
||||
} else {
|
||||
if ($state.is('copayers')) {
|
||||
$log.debug('Wallet Complete after update... redirect to home');
|
||||
go.walletHome();
|
||||
profileService.isBackupNeeded(self.walletId, function(needsBackup) {
|
||||
self.needsBackup = needsBackup;
|
||||
self.openWallet(function() {
|
||||
if (!self.isComplete) {
|
||||
$log.debug('Wallet not complete after update... redirecting');
|
||||
go.path('copayers');
|
||||
} else {
|
||||
if ($state.is('copayers')) {
|
||||
$log.debug('Wallet Complete after update... redirect to home');
|
||||
go.walletHome();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -1489,7 +1491,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
});
|
||||
|
||||
//untilItChange FALSE
|
||||
//untilItChange FALSE
|
||||
lodash.each(['NewTxProposal', 'TxProposalFinallyRejected', 'TxProposalRemoved', 'NewOutgoingTxByThirdParty',
|
||||
'Local/GlideraTx'
|
||||
], function(eventName) {
|
||||
|
|
|
|||
|
|
@ -246,21 +246,28 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
};
|
||||
|
||||
$scope.selectWallet = function(walletId, walletName) {
|
||||
$scope.gettingAddress = true;
|
||||
$scope.selectedWalletName = walletName;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
addressService.getAddress(walletId, false, function(err, addr) {
|
||||
$scope.gettingAddress = false;
|
||||
profileService.isBackupNeeded(walletId, function(needsBackup) {
|
||||
$scope.needsBackup = {};
|
||||
$scope.needsBackup[walletId] = needsBackup;
|
||||
if (needsBackup) return;
|
||||
|
||||
if (err) {
|
||||
self.error = err;
|
||||
$modalInstance.dismiss('cancel');
|
||||
return;
|
||||
}
|
||||
$scope.gettingAddress = true;
|
||||
$scope.selectedWalletName = walletName;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
|
||||
$modalInstance.close(addr);
|
||||
addressService.getAddress(walletId, false, function(err, addr) {
|
||||
$scope.gettingAddress = false;
|
||||
|
||||
if (err) {
|
||||
self.error = err;
|
||||
$modalInstance.dismiss('cancel');
|
||||
return;
|
||||
}
|
||||
|
||||
$modalInstance.close(addr);
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue