aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/refresh.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-08-20 11:59:06 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-08-20 11:59:06 +0530
commit57000c22141afde7eb7b13ccbd16f06d6b6eb5cd (patch)
treefc0de2a8a01bdc637325ec735e7a8f68e856532c /packages/taler-wallet-core/src/operations/refresh.ts
parent7ff93d8ef64d8ae832c2267192ce1f97bf914776 (diff)
downloadwallet-core-57000c22141afde7eb7b13ccbd16f06d6b6eb5cd.tar.xz
add auto-refund test case, fix bug detected by it
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/refresh.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts
index 409ae58cc..430675328 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -571,10 +571,19 @@ export async function createRefreshGroup(
retryInfo: initRetryInfo(),
};
+ if (oldCoinPubs.length == 0) {
+ logger.warn("created refresh group with zero coins");
+ refreshGroup.timestampFinished = getTimestampNow();
+ }
+
await tx.put(Stores.refreshGroups, refreshGroup);
logger.trace(`created refresh group ${refreshGroupId}`);
+ processRefreshGroup(ws, refreshGroupId).catch((e) => {
+ logger.warn(`processing refresh group ${refreshGroupId} failed`);
+ });
+
return {
refreshGroupId,
};