summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/pending-types.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-09-05 18:12:30 +0200
committerFlorian Dold <florian@dold.me>2022-09-13 16:10:41 +0200
commit13e7a674778754c0ed641dfd428e3d6b2b71ab2d (patch)
treef2a0e5029305a9b818416fd94908ef77cdd7446f /packages/taler-wallet-core/src/pending-types.ts
parentf9f2911c761af1c8ed1c323dcd414cbaa9eeae7c (diff)
downloadwallet-core-13e7a674778754c0ed641dfd428e3d6b2b71ab2d.tar.gz
wallet-core-13e7a674778754c0ed641dfd428e3d6b2b71ab2d.tar.bz2
wallet-core-13e7a674778754c0ed641dfd428e3d6b2b71ab2d.zip
wallet-core: uniform retry handling
Diffstat (limited to 'packages/taler-wallet-core/src/pending-types.ts')
-rw-r--r--packages/taler-wallet-core/src/pending-types.ts24
1 files changed, 8 insertions, 16 deletions
diff --git a/packages/taler-wallet-core/src/pending-types.ts b/packages/taler-wallet-core/src/pending-types.ts
index 39df9d0cb..61c7136df 100644
--- a/packages/taler-wallet-core/src/pending-types.ts
+++ b/packages/taler-wallet-core/src/pending-types.ts
@@ -30,14 +30,12 @@ import {
AbsoluteTime,
TalerProtocolTimestamp,
} from "@gnu-taler/taler-util";
-import { ReserveRecordStatus } from "./db.js";
import { RetryInfo } from "./util/retries.js";
export enum PendingTaskType {
ExchangeUpdate = "exchange-update",
ExchangeCheckRefresh = "exchange-check-refresh",
Pay = "pay",
- ProposalChoice = "proposal-choice",
ProposalDownload = "proposal-download",
Refresh = "refresh",
Recoup = "recoup",
@@ -109,7 +107,7 @@ export interface PendingRefreshTask {
lastError?: TalerErrorDetail;
refreshGroupId: string;
finishedPerCoin: boolean[];
- retryInfo: RetryInfo;
+ retryInfo?: RetryInfo;
}
/**
@@ -126,17 +124,6 @@ export interface PendingProposalDownloadTask {
}
/**
- * User must choose whether to accept or reject the merchant's
- * proposed contract terms.
- */
-export interface PendingProposalChoiceOperation {
- type: PendingTaskType.ProposalChoice;
- merchantBaseUrl: string;
- proposalTimestamp: AbsoluteTime;
- proposalId: string;
-}
-
-/**
* The wallet is picking up a tip that the user has accepted.
*/
export interface PendingTipPickupTask {
@@ -165,14 +152,14 @@ export interface PendingPayTask {
export interface PendingRefundQueryTask {
type: PendingTaskType.RefundQuery;
proposalId: string;
- retryInfo: RetryInfo;
+ retryInfo?: RetryInfo;
lastError: TalerErrorDetail | undefined;
}
export interface PendingRecoupTask {
type: PendingTaskType.Recoup;
recoupGroupId: string;
- retryInfo: RetryInfo;
+ retryInfo?: RetryInfo;
lastError: TalerErrorDetail | undefined;
}
@@ -206,6 +193,11 @@ export interface PendingTaskInfoCommon {
type: PendingTaskType;
/**
+ * Unique identifier for the pending task.
+ */
+ id: string;
+
+ /**
* Set to true if the operation indicates that something is really in progress,
* as opposed to some regular scheduled operation that can be tried later.
*/