aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-10-21 11:08:10 -0300
committerSebastian <sebasjm@gmail.com>2022-10-21 11:08:10 -0300
commit5ba7956f49675bf961894ad9e6e9f074c2edca07 (patch)
tree0f9ad98db657256dd9bf4bd3e68b3e5d19e47a0e
parent5da924a760c3641f46f509b552e2b35f2fb6356e (diff)
unlockBackup was not unlocking: not updating when backup state is ready also nextBackupTimestap = now tries to backup in a loop
-rw-r--r--packages/taler-wallet-core/src/operations/pay-merchant.ts18
1 files changed, 12 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index baf520c5b..70ca0981f 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -891,12 +891,18 @@ async function unblockBackup(
await tx.backupProviders.indexes.byPaymentProposalId
.iter(proposalId)
.forEachAsync(async (bp) => {
- if (bp.state.tag === BackupProviderStateTag.Retrying) {
- bp.state = {
- tag: BackupProviderStateTag.Ready,
- nextBackupTimestamp: TalerProtocolTimestamp.now(),
- };
- }
+ // if (bp.state.tag === BackupProviderStateTag.Retrying) {
+ bp.state = {
+ tag: BackupProviderStateTag.Ready,
+ nextBackupTimestamp: AbsoluteTime.toTimestamp(
+ AbsoluteTime.addDuration(
+ AbsoluteTime.now(),
+ Duration.fromSpec({ days: 7 }),
+ ),
+ ),
+ };
+ // }
+ tx.backupProviders.put(bp);
});
});
}