diff options
author | Florian Dold <florian@dold.me> | 2024-01-29 21:29:26 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-01-29 21:29:35 +0100 |
commit | 61e3484d6ce1db846c435d84cbf5b9c3711a30f2 (patch) | |
tree | 841e9889c5814c458622904203a46853aa0e2708 /packages/taler-util/src | |
parent | 57d988cf4ceffb51e8936bd36eed4aefcdc2d2dc (diff) | |
download | wallet-core-61e3484d6ce1db846c435d84cbf5b9c3711a30f2.tar.xz |
wallet-core,harness: let runIntegrationTest wait for its own transactions
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r-- | packages/taler-util/src/transactions-types.ts | 25 | ||||
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 13 |
2 files changed, 32 insertions, 6 deletions
diff --git a/packages/taler-util/src/transactions-types.ts b/packages/taler-util/src/transactions-types.ts index 00802577a..a0bc2a89d 100644 --- a/packages/taler-util/src/transactions-types.ts +++ b/packages/taler-util/src/transactions-types.ts @@ -207,7 +207,8 @@ export type Transaction = | TransactionPeerPullDebit | TransactionPeerPushCredit | TransactionPeerPushDebit - | TransactionInternalWithdrawal; + | TransactionInternalWithdrawal + | TransactionRecoup; export enum TransactionType { Withdrawal = "withdrawal", @@ -221,6 +222,7 @@ export enum TransactionType { PeerPushCredit = "peer-push-credit", PeerPullDebit = "peer-pull-debit", PeerPullCredit = "peer-pull-credit", + Recoup = "recoup", } export enum WithdrawalType { @@ -446,6 +448,13 @@ export interface TransactionPeerPushCredit extends TransactionCommon { amountEffective: AmountString; } +/** + * The exchange revoked a key and the wallet recoups funds. + */ +export interface TransactionRecoup extends TransactionCommon { + type: TransactionType.Recoup; +} + export enum PaymentStatus { /** * Explicitly aborted after timeout / failure @@ -754,3 +763,17 @@ export const codecForOrderShortInfo = (): Codec<OrderShortInfo> => .property("summary", codecForString()) .property("summary_i18n", codecOptional(codecForInternationalizedString())) .build("OrderShortInfo"); + +export interface ListAssociatedRefreshesRequest { + transactionId: string; +} + +export const codecForListAssociatedRefreshesRequest = + (): Codec<ListAssociatedRefreshesRequest> => + buildCodecForObject<ListAssociatedRefreshesRequest>() + .property("transactionId", codecForString()) + .build("ListAssociatedRefreshesRequest"); + +export interface ListAssociatedRefreshesResponse { + transactionIds: string[]; +} diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 806e2f22b..6fcd43fc5 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -577,11 +577,11 @@ export interface CoinDumpJson { withdrawal_reserve_pub: string | undefined; coin_status: CoinStatus; spend_allocation: - | { - id: string; - amount: AmountString; - } - | undefined; + | { + id: string; + amount: AmountString; + } + | undefined; /** * Information about the age restriction */ @@ -2095,6 +2095,9 @@ export interface PrepareRefundRequest { } export interface StartRefundQueryForUriResponse { + /** + * Transaction id of the *payment* where the refund query was started. + */ transactionId: TransactionIdStr; } |