diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-08-20 11:59:06 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-08-20 11:59:06 +0530 |
commit | 57000c22141afde7eb7b13ccbd16f06d6b6eb5cd (patch) | |
tree | fc0de2a8a01bdc637325ec735e7a8f68e856532c /packages/taler-wallet-core/src/operations/refresh.ts | |
parent | 7ff93d8ef64d8ae832c2267192ce1f97bf914776 (diff) | |
download | wallet-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.ts | 9 |
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, }; |