Refresh list of pending transactions proposals after any events
This commit is contained in:
parent
692852617f
commit
431a66eeb2
6 changed files with 108 additions and 129 deletions
|
|
@ -16,24 +16,10 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
$scope.blockchain_txs = [];
|
||||
$scope.alternativeCurrency = [];
|
||||
|
||||
var satToUnit = 1 / w.settings.unitToSatoshi;
|
||||
|
||||
|
||||
$scope.update = function() {
|
||||
$scope.loading = true;
|
||||
var from = ($scope.txpCurrentPage - 1) * $scope.txpItemsPerPage;
|
||||
var opts = {
|
||||
pending: false,
|
||||
skip: [from, from + $scope.txpItemsPerPage]
|
||||
};
|
||||
controllerUtils.updateTxs(opts);
|
||||
setTimeout(function() {
|
||||
$rootScope.$digest();
|
||||
}, 0);
|
||||
$scope.getTransactions();
|
||||
};
|
||||
|
||||
|
||||
|
||||
$scope.show = function() {
|
||||
$scope.loading = true;
|
||||
setTimeout(function() {
|
||||
|
|
@ -61,9 +47,6 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
|
||||
_.each(res, function(r) {
|
||||
r.ts = r.minedTs || r.sentTs;
|
||||
if (r.action === 'sent' && r.peerActions) {
|
||||
r.actionList = controllerUtils.getActionList(r.peerActions);
|
||||
}
|
||||
});
|
||||
$scope.blockchain_txs = w.cached_txs = res;
|
||||
$scope.loading = false;
|
||||
|
|
@ -76,13 +59,11 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
|
||||
$scope.hasAction = function(actions, action) {
|
||||
return actions.hasOwnProperty('create');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.getShortNetworkName = function() {
|
||||
var w = $rootScope.wallet;
|
||||
return w.getNetworkName().substring(0, 4);
|
||||
};
|
||||
|
||||
// Autoload transactions
|
||||
$scope.getTransactions();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -72,11 +72,8 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
});
|
||||
|
||||
$scope.loadTxs = function() {
|
||||
var opts = {
|
||||
pending: true,
|
||||
skip: null
|
||||
};
|
||||
controllerUtils.updateTxs(opts);
|
||||
controllerUtils.updateTxs();
|
||||
|
||||
setTimeout(function() {
|
||||
$scope.loading = false;
|
||||
$rootScope.$digest();
|
||||
|
|
|
|||
|
|
@ -72,10 +72,6 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
|||
if (controllerUtils.isFocusedWallet(wid)) return;
|
||||
var w = $rootScope.iden.getWalletById(wid);
|
||||
$scope.wallets.push(w);
|
||||
controllerUtils.updateTxs({
|
||||
wallet: w,
|
||||
pending: true
|
||||
});
|
||||
controllerUtils.updateBalance(w, function() {
|
||||
$rootScope.$digest();
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue