summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-14 13:38:12 +0100
committerFlorian Dold <florian@dold.me>2023-02-14 13:38:12 +0100
commit58c59a3e5ec2b3460c532e83c8bf5d7acdd09d25 (patch)
tree4409049e66adf65698c058734350e5eba938f463 /packages
parent12fc0b3f2a12778c3ee439f3d4fc470c4e9c0bfd (diff)
downloadwallet-core-58c59a3e5ec2b3460c532e83c8bf5d7acdd09d25.tar.gz
wallet-core-58c59a3e5ec2b3460c532e83c8bf5d7acdd09d25.tar.bz2
wallet-core-58c59a3e5ec2b3460c532e83c8bf5d7acdd09d25.zip
walet-core: always show refresh transactions when in an error state
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-wallet-core/src/operations/transactions.ts23
1 files changed, 16 insertions, 7 deletions
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts
index 5b6b5adc3..0dbbc56c1 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -971,16 +971,25 @@ export async function getTransactions(
transactions.push(buildTransactionForPullPaymentDebit(pi));
});
- if (transactionsRequest?.includeRefreshes) {
- tx.refreshGroups.iter().forEachAsync(async (rg) => {
- if (shouldSkipCurrency(transactionsRequest, rg.currency)) {
- return;
+ tx.refreshGroups.iter().forEachAsync(async (rg) => {
+ if (shouldSkipCurrency(transactionsRequest, rg.currency)) {
+ return;
+ }
+ let required = false;
+ const opId = RetryTags.forRefresh(rg);
+ if (transactionsRequest?.includeRefreshes) {
+ required = true;
+ } else if (rg.operationStatus !== RefreshOperationStatus.Finished) {
+ const ort = await tx.operationRetries.get(opId);
+ if (ort) {
+ required = true;
}
- const opId = RetryTags.forRefresh(rg);
+ }
+ if (required) {
const ort = await tx.operationRetries.get(opId);
transactions.push(buildTransactionForRefresh(rg, ort));
- });
- }
+ }
+ });
tx.withdrawalGroups.iter().forEachAsync(async (wsr) => {
if (