added a user friendly message when insight doesnt work
This commit is contained in:
parent
194ddc8079
commit
6c973d7f88
3 changed files with 62 additions and 25 deletions
|
|
@ -114,7 +114,19 @@ angular.module('copay.controllerUtils')
|
|||
|
||||
$rootScope.balanceByAddr = {};
|
||||
$rootScope.updatingBalance = true;
|
||||
w.getBalance(function(balance, balanceByAddr, safeBalance) {
|
||||
w.getBalance(function(err, balance, balanceByAddr, safeBalance) {
|
||||
if (err) {
|
||||
$rootScope.$flashMessage = {
|
||||
type: 'error',
|
||||
message: 'Error: ' + err.message
|
||||
};
|
||||
|
||||
$rootScope.$digest();
|
||||
console.error('Error: ' + err.message); //TODO
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$rootScope.totalBalance = balance;
|
||||
$rootScope.balanceByAddr = balanceByAddr;
|
||||
$rootScope.availableBalance = safeBalance;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue