diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/backup')
-rw-r--r-- | packages/taler-wallet-core/src/operations/backup/export.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/export.ts b/packages/taler-wallet-core/src/operations/backup/export.ts index 59b862d70..1b2a7f637 100644 --- a/packages/taler-wallet-core/src/operations/backup/export.ts +++ b/packages/taler-wallet-core/src/operations/backup/export.ts @@ -413,23 +413,31 @@ export async function exportBackup( let propStatus: BackupProposalStatus; switch (purch.purchaseStatus) { case PurchaseStatus.Paid: + case PurchaseStatus.QueryingAutoRefund: + case PurchaseStatus.QueryingRefund: propStatus = BackupProposalStatus.Paid; - return; + break; + case PurchaseStatus.PayingReplay: case PurchaseStatus.DownloadingProposal: case PurchaseStatus.Proposed: + case PurchaseStatus.Paying: propStatus = BackupProposalStatus.Proposed; break; case PurchaseStatus.ProposalDownloadFailed: + case PurchaseStatus.PaymentAbortFinished: propStatus = BackupProposalStatus.PermanentlyFailed; break; + case PurchaseStatus.AbortingWithRefund: case PurchaseStatus.ProposalRefused: propStatus = BackupProposalStatus.Refused; break; case PurchaseStatus.RepurchaseDetected: propStatus = BackupProposalStatus.Repurchase; break; - default: - throw Error(); + default: { + const error: never = purch.purchaseStatus; + throw Error(`purchase status ${error} is not handled`); + } } const payInfo = purch.payInfo; |