summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/types
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-09-01 18:00:46 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-09-01 18:00:51 +0530
commit5056da6548d5880211abd3e1cdacd92134e40dab (patch)
treedb7ede721ddd33c52dd862562b340f0782dabb22 /packages/taler-wallet-core/src/types
parent5e7149f79eeb9988a7da45ecc8573c65e9680082 (diff)
downloadwallet-core-5056da6548d5880211abd3e1cdacd92134e40dab.tar.gz
wallet-core-5056da6548d5880211abd3e1cdacd92134e40dab.tar.bz2
wallet-core-5056da6548d5880211abd3e1cdacd92134e40dab.zip
test error handling
Diffstat (limited to 'packages/taler-wallet-core/src/types')
-rw-r--r--packages/taler-wallet-core/src/types/pending.ts7
-rw-r--r--packages/taler-wallet-core/src/types/transactions.ts21
-rw-r--r--packages/taler-wallet-core/src/types/walletTypes.ts3
3 files changed, 10 insertions, 21 deletions
diff --git a/packages/taler-wallet-core/src/types/pending.ts b/packages/taler-wallet-core/src/types/pending.ts
index 85f7585c5..67d243a37 100644
--- a/packages/taler-wallet-core/src/types/pending.ts
+++ b/packages/taler-wallet-core/src/types/pending.ts
@@ -210,6 +210,7 @@ export interface PendingWithdrawOperation {
type: PendingOperationType.Withdraw;
source: WithdrawalSource;
lastError: OperationErrorDetails | undefined;
+ retryInfo: RetryInfo;
withdrawalGroupId: string;
numCoinsWithdrawn: number;
numCoinsTotal: number;
@@ -229,6 +230,12 @@ export interface PendingOperationInfoCommon {
* as opposed to some regular scheduled operation or a permanent failure.
*/
givesLifeness: boolean;
+
+ /**
+ * Retry info, not available on all pending operations.
+ * If it is available, it must have the same name.
+ */
+ retryInfo?: RetryInfo;
}
/**
diff --git a/packages/taler-wallet-core/src/types/transactions.ts b/packages/taler-wallet-core/src/types/transactions.ts
index 061ce28f4..400439548 100644
--- a/packages/taler-wallet-core/src/types/transactions.ts
+++ b/packages/taler-wallet-core/src/types/transactions.ts
@@ -42,6 +42,7 @@ import {
codecForList,
codecForAny,
} from "../util/codec";
+import { OperationErrorDetails } from "./walletTypes";
export interface TransactionsRequest {
/**
@@ -63,24 +64,6 @@ export interface TransactionsResponse {
transactions: Transaction[];
}
-export interface TransactionError {
- /**
- * TALER_EC_* unique error code.
- * The action(s) offered and message displayed on the transaction item depend on this code.
- */
- ec: number;
-
- /**
- * English-only error hint, if available.
- */
- hint?: string;
-
- /**
- * Error details specific to "ec", if applicable/available
- */
- details?: any;
-}
-
export interface TransactionCommon {
// opaque unique ID for the transaction, used as a starting point for paginating queries
// and for invoking actions on the transaction (e.g. deleting/hiding it from the history)
@@ -103,7 +86,7 @@ export interface TransactionCommon {
// Amount added or removed from the wallet's balance (including all fees and other costs)
amountEffective: AmountString;
- error?: TransactionError;
+ error?: OperationErrorDetails;
}
export type Transaction =
diff --git a/packages/taler-wallet-core/src/types/walletTypes.ts b/packages/taler-wallet-core/src/types/walletTypes.ts
index 2cf3c7fbc..eb7d878fa 100644
--- a/packages/taler-wallet-core/src/types/walletTypes.ts
+++ b/packages/taler-wallet-core/src/types/walletTypes.ts
@@ -51,7 +51,6 @@ import {
buildCodecForUnion,
} from "../util/codec";
import { AmountString, codecForContractTerms, ContractTerms } from "./talerTypes";
-import { TransactionError, OrderShortInfo, codecForOrderShortInfo } from "./transactions";
/**
* Response for the create reserve request to the wallet.
@@ -215,7 +214,7 @@ export interface ConfirmPayResultDone {
export interface ConfirmPayResultPending {
type: ConfirmPayResultType.Pending;
- lastError: TransactionError;
+ lastError: OperationErrorDetails;
}
export type ConfirmPayResult = ConfirmPayResultDone | ConfirmPayResultPending;