summaryrefslogtreecommitdiff
path: root/packages/taler-util/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-29 21:21:57 +0200
committerFlorian Dold <florian@dold.me>2022-03-29 21:22:03 +0200
commitbbd6ccf1c7c0baea44234863967e640f5cb10a3a (patch)
tree219086b57e229b79e674619180200284762c3f4b /packages/taler-util/src
parentfdd272af203d7048f980a2f2b5d405e5c94ebec2 (diff)
downloadwallet-core-bbd6ccf1c7c0baea44234863967e640f5cb10a3a.tar.gz
wallet-core-bbd6ccf1c7c0baea44234863967e640f5cb10a3a.tar.bz2
wallet-core-bbd6ccf1c7c0baea44234863967e640f5cb10a3a.zip
wallet: allow forced denom selection for tests
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r--packages/taler-util/src/walletTypes.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts
index 552087fb8..818ba37fe 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -212,6 +212,12 @@ export interface CreateReserveRequest {
* URL to fetch the withdraw status from the bank.
*/
bankWithdrawStatusUrl?: string;
+
+ /**
+ * Forced denomination selection for the first withdrawal
+ * from this reserve, only used for testing.
+ */
+ forcedDenomSel?: ForcedDenomSel;
}
export const codecForCreateReserveRequest = (): Codec<CreateReserveRequest> =>
@@ -727,6 +733,7 @@ export interface GetWithdrawalDetailsForAmountRequest {
export interface AcceptBankIntegratedWithdrawalRequest {
talerWithdrawUri: string;
exchangeBaseUrl: string;
+ forcedDenomSel?: ForcedDenomSel;
}
export const codecForAcceptBankIntegratedWithdrawalRequest =
@@ -734,6 +741,7 @@ export const codecForAcceptBankIntegratedWithdrawalRequest =
buildCodecForObject<AcceptBankIntegratedWithdrawalRequest>()
.property("exchangeBaseUrl", codecForString())
.property("talerWithdrawUri", codecForString())
+ .property("forcedDenomSel", codecForAny())
.build("AcceptBankIntegratedWithdrawalRequest");
export const codecForGetWithdrawalDetailsForAmountRequest =
@@ -1134,6 +1142,9 @@ export const codecForImportDbRequest = (): Codec<ImportDb> =>
.property("dump", codecForAny())
.build("ImportDbRequest");
-
-
- \ No newline at end of file
+export interface ForcedDenomSel {
+ denoms: {
+ value: AmountString;
+ count: number;
+ }[];
+}