Refresh balance on new block
This commit is contained in:
parent
26c829f6de
commit
e1dc275ddd
2 changed files with 13 additions and 0 deletions
|
|
@ -292,6 +292,15 @@ angular.module('copayApp.services')
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
if (!$rootScope.wallet.spendUnconfirmed && !Socket.isListeningBlocks()) {
|
||||
Socket.emit('subscribe', 'inv');
|
||||
Socket.on('block', function(block) {
|
||||
root.updateBalance(function() {
|
||||
$rootScope.$digest();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
return root;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue