Merge pull request #451 from colkito/fix/user-friendly-insight-error-message
Fix/user friendly insight error message
This commit is contained in:
commit
41aac17688
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