diff options
author | Florian Dold <florian@dold.me> | 2022-10-08 23:21:34 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-10-08 23:21:34 +0200 |
commit | 3897bd4f018bf23ab485325d48a259958653ff52 (patch) | |
tree | fd80991886ef02d121116efa909b440e566c9a0d /packages/taler-util/src/transactionsTypes.ts | |
parent | 526f4eba9554f27e33afb0e02d19d870825b038c (diff) | |
download | wallet-core-3897bd4f018bf23ab485325d48a259958653ff52.tar.xz |
wallet-core: spec/clarify explicit refresh transaction
Diffstat (limited to 'packages/taler-util/src/transactionsTypes.ts')
-rw-r--r-- | packages/taler-util/src/transactionsTypes.ts | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/packages/taler-util/src/transactionsTypes.ts b/packages/taler-util/src/transactionsTypes.ts index 3dc4a93d7..5fd01448c 100644 --- a/packages/taler-util/src/transactionsTypes.ts +++ b/packages/taler-util/src/transactionsTypes.ts @@ -43,7 +43,7 @@ import { codecForList, codecForAny, } from "./codec.js"; -import { TalerErrorDetail } from "./walletTypes.js"; +import { RefreshReason, TalerErrorDetail } from "./walletTypes.js"; export interface TransactionsRequest { /** @@ -468,19 +468,35 @@ export interface TransactionTip extends TransactionCommon { merchantBaseUrl: string; } -// A transaction shown for refreshes that are not associated to other transactions -// such as a refresh necessary before coin expiration. -// It should only be returned by the API if the effective amount is different from zero. +/** + * A transaction shown for refreshes. + * Only shown for (1) refreshes not associated with other transactions + * and (2) refreshes in an error state. + */ export interface TransactionRefresh extends TransactionCommon { type: TransactionType.Refresh; - // Exchange that the coins are refreshed with + /** + * Exchange that the coins are refreshed with + */ exchangeBaseUrl: string; - // Raw amount that is refreshed + refreshReason: RefreshReason; + + /** + * Transaction ID that caused this refresh. + */ + originatingTransactionId?: string; + + /** + * Always zero for refreshes + */ amountRaw: AmountString; - // Amount that will be paid as fees for the refresh + /** + * Fees, i.e. the effective, negative effect of the refresh + * on the balance. + */ amountEffective: AmountString; } |