Fix recent transactions. Show the latest transactions within 24 hours
This commit is contained in:
parent
1019f60845
commit
5ead443c24
6 changed files with 56 additions and 127 deletions
|
|
@ -26,7 +26,10 @@ angular.module('copayApp.controllers').controller('activityController',
|
|||
|
||||
$scope.openNotificationModal = function(n) {
|
||||
if (n.txid) {
|
||||
openTxModal(n);
|
||||
$state.transitionTo('tabs.wallet.tx-details', {
|
||||
txid: n.txid,
|
||||
walletId: n.walletId
|
||||
});
|
||||
} else {
|
||||
var txp = lodash.find($scope.txps, {
|
||||
id: n.txpId
|
||||
|
|
@ -46,35 +49,4 @@ angular.module('copayApp.controllers').controller('activityController',
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
var openTxModal = function(n) {
|
||||
var wallet = profileService.getWallet(n.walletId);
|
||||
|
||||
ongoingProcess.set('loadingTxInfo', true);
|
||||
walletService.getTx(wallet, n.txid, function(err, tx) {
|
||||
ongoingProcess.set('loadingTxInfo', false);
|
||||
|
||||
if (err) {
|
||||
$log.error(err);
|
||||
return popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
}
|
||||
|
||||
if (!tx) {
|
||||
$log.warn('No tx found');
|
||||
return popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Transaction not found'));
|
||||
}
|
||||
|
||||
$scope.wallet = wallet;
|
||||
$scope.btx = lodash.cloneDeep(tx);
|
||||
$state.transitionTo('tabs.wallet.tx-details', {
|
||||
txid: $scope.btx.txid,
|
||||
walletId: $scope.walletId
|
||||
});
|
||||
|
||||
walletService.getTxNote(wallet, n.txid, function(err, note) {
|
||||
if (err) $log.warn('Could not fetch transaction note: ' + err);
|
||||
$scope.btx.note = note;
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue