From 5ba7956f49675bf961894ad9e6e9f074c2edca07 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 21 Oct 2022 11:08:10 -0300 Subject: unlockBackup was not unlocking: not updating when backup state is ready also nextBackupTimestap = now tries to backup in a loop --- .../taler-wallet-core/src/operations/pay-merchant.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'packages/taler-wallet-core/src') 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); }); }); } -- cgit v1.2.3