taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 5ba7956f49675bf961894ad9e6e9f074c2edca07
parent 5da924a760c3641f46f509b552e2b35f2fb6356e
Author: Sebastian <sebasjm@gmail.com>
Date:   Fri, 21 Oct 2022 11:08:10 -0300

unlockBackup was not unlocking: not updating when backup state is ready also nextBackupTimestap = now tries to backup in a loop

Diffstat:
Mpackages/taler-wallet-core/src/operations/pay-merchant.ts | 18++++++++++++------
1 file 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 @@ -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); }); }); }