Notify when history is updating the latest tx sent. After sent, back home
This commit is contained in:
parent
7b0d36890f
commit
32a09dfb7b
3 changed files with 18 additions and 12 deletions
|
|
@ -75,7 +75,7 @@
|
||||||
<div class="oh pr">
|
<div class="oh pr">
|
||||||
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
|
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
|
||||||
<div ng-if="!index.anyOnGoingProcess && !index.notAuthorized">
|
<div ng-if="!index.anyOnGoingProcess && !index.notAuthorized">
|
||||||
<div ng-show="index.updateError" ng-click='index.openWallet(); index.updateTxHistory()'>
|
<div ng-show="index.updateError" ng-click='index.openWallet()'>
|
||||||
<span class="size-12 db m10b">{{index.updateError|translate}}</span>
|
<span class="size-12 db m10b">{{index.updateError|translate}}</span>
|
||||||
<button class="outline white tiny round" translate>Tap to retry</button>
|
<button class="outline white tiny round" translate>Tap to retry</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
<br><span translate>Tap to retry</span>
|
<br><span translate>Tap to retry</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-click='index.updateAll(); index.updateTxHistory()' ng-show="!index.updateError && index.walletScanStatus != 'error'">
|
<div ng-click='index.updateAll({triggerTxUpdate: true})' ng-show="!index.updateError && index.walletScanStatus != 'error'">
|
||||||
<strong class="size-36">{{index.totalBalanceStr}}</strong>
|
<strong class="size-36">{{index.totalBalanceStr}}</strong>
|
||||||
<div class="size-14"
|
<div class="size-14"
|
||||||
ng-if="index.totalBalanceAlternative">
|
ng-if="index.totalBalanceAlternative">
|
||||||
|
|
@ -180,7 +180,7 @@
|
||||||
<span ng-if="!index.txHistoryError" translate>
|
<span ng-if="!index.txHistoryError" translate>
|
||||||
No transactions yet
|
No transactions yet
|
||||||
</span>
|
</span>
|
||||||
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.updateTxHistory()'>
|
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.debounceUpdateHistory()'>
|
||||||
<p translate>Could not fetch transaction history</p>
|
<p translate>Could not fetch transaction history</p>
|
||||||
<button class="outline round light-gray tiny" translate>Tap to retry</button>
|
<button class="outline round light-gray tiny" translate>Tap to retry</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -206,7 +206,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="index.txHistory[0]">
|
<div ng-show="index.txHistory[0]">
|
||||||
<h4 class="title m0" translate>Activity</h4>
|
<h4 class="title m0">
|
||||||
|
<span translate>Activity</span>
|
||||||
|
<small ng-show="index.updatingTxHistory[index.walletId] && !index.loadingWallet" translate>
|
||||||
|
Updating...
|
||||||
|
</small>
|
||||||
|
</h4>
|
||||||
|
|
||||||
<div ng-repeat="btx in index.txHistory"
|
<div ng-repeat="btx in index.txHistory"
|
||||||
ng-click="home.openTxModal(btx)"
|
ng-click="home.openTxModal(btx)"
|
||||||
class="row collapse last-transactions-content">
|
class="row collapse last-transactions-content">
|
||||||
|
|
|
||||||
|
|
@ -364,7 +364,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
|
|
||||||
if (opts.triggerTxUpdate) {
|
if (opts.triggerTxUpdate) {
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
self.updateTxHistory();
|
self.debounceUpdateHistory();
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -953,13 +953,13 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.updateTxHistory = lodash.debounce(function() {
|
self.debounceUpdateHistory = lodash.debounce(function() {
|
||||||
self.updateHistory();
|
self.updateHistory();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
self.throttledUpdateHistory = lodash.throttle(function() {
|
self.throttledUpdateHistory = lodash.throttle(function() {
|
||||||
self.updateHistory();
|
self.updateHistory();
|
||||||
}, 5000);
|
}, 10000);
|
||||||
|
|
||||||
self.showErrorPopup = function(msg, cb) {
|
self.showErrorPopup = function(msg, cb) {
|
||||||
$log.warn('Showing err popup:' + msg);
|
$log.warn('Showing err popup:' + msg);
|
||||||
|
|
@ -1140,7 +1140,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
$rootScope.$on('Local/ClearHistory', function(event) {
|
$rootScope.$on('Local/ClearHistory', function(event) {
|
||||||
$log.debug('The wallet transaction history has been deleted');
|
$log.debug('The wallet transaction history has been deleted');
|
||||||
self.txHistory = self.completeHistory = [];
|
self.txHistory = self.completeHistory = [];
|
||||||
self.updateHistory();
|
self.debounceUpdateHistory();
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('Local/AddressbookUpdated', function(event, ab) {
|
$rootScope.$on('Local/AddressbookUpdated', function(event, ab) {
|
||||||
|
|
@ -1232,7 +1232,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.updateAll({
|
self.updateAll({
|
||||||
quiet: true
|
quiet: true
|
||||||
});
|
});
|
||||||
self.updateTxHistory();
|
self.debounceUpdateHistory();
|
||||||
}, 4000, {
|
}, 4000, {
|
||||||
leading: false,
|
leading: false,
|
||||||
trailing: true
|
trailing: true
|
||||||
|
|
@ -1301,7 +1301,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
if (self.network == 'testnet') {
|
if (self.network == 'testnet') {
|
||||||
self.throttledUpdateHistory();
|
self.throttledUpdateHistory();
|
||||||
} else {
|
} else {
|
||||||
self.updateTxHistory();
|
self.debounceUpdateHistory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -1362,7 +1362,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
$rootScope.$on('Local/NewFocusedWallet', function() {
|
$rootScope.$on('Local/NewFocusedWallet', function() {
|
||||||
self.setUxLanguage();
|
self.setUxLanguage();
|
||||||
self.setFocusedWallet();
|
self.setFocusedWallet();
|
||||||
self.updateTxHistory();
|
self.debounceUpdateHistory();
|
||||||
self.isDisclaimerAccepted();
|
self.isDisclaimerAccepted();
|
||||||
storageService.getCleanAndScanAddresses(function(err, walletId) {
|
storageService.getCleanAndScanAddresses(function(err, walletId) {
|
||||||
if (walletId && profileService.walletClients[walletId]) {
|
if (walletId && profileService.walletClients[walletId]) {
|
||||||
|
|
|
||||||
|
|
@ -911,7 +911,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
} else go.walletHome();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue