adds errorCb, handles blocks
This commit is contained in:
parent
ba40323b7b
commit
fe07348a5a
3 changed files with 37 additions and 2 deletions
|
|
@ -63,6 +63,9 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
if (err) {
|
||||
$log.debug(err);
|
||||
self.error = err;
|
||||
$timeout(function() {
|
||||
$rootScope.$apply();
|
||||
});
|
||||
}
|
||||
else {
|
||||
go.walletHome();
|
||||
|
|
|
|||
|
|
@ -960,6 +960,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
trailing: true
|
||||
});
|
||||
|
||||
self.debouncedUpdateHistory = lodash.throttle(function() {
|
||||
self.updateTxHistory();
|
||||
}, 60000);
|
||||
|
||||
$rootScope.$on('Local/Resume', function(event) {
|
||||
$log.debug('### Resume event');
|
||||
|
|
@ -1023,6 +1026,20 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
$rootScope.$on('NewBlock', function() {
|
||||
if (self.pendingAmount) {
|
||||
self.updateAll();
|
||||
}
|
||||
|
||||
if (self.network =='testnet') {
|
||||
self.debouncedUpdateHistory();
|
||||
} else {
|
||||
self.updateTxHistory();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$rootScope.$on('NewOutgoingTx', function() {
|
||||
self.updateAll({
|
||||
walletStatus: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue