summaryrefslogtreecommitdiff
path: root/packages/taler-util/src/walletTypes.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-10-14 11:36:43 +0200
committerFlorian Dold <florian@dold.me>2021-10-14 11:36:43 +0200
commitc53264869451ccbfbaf1976e01df8c7636163068 (patch)
treea6f4359d4fcd558ee443991111404bc095642e5b /packages/taler-util/src/walletTypes.ts
parent6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202 (diff)
downloadwallet-core-c53264869451ccbfbaf1976e01df8c7636163068.tar.gz
wallet-core-c53264869451ccbfbaf1976e01df8c7636163068.tar.bz2
wallet-core-c53264869451ccbfbaf1976e01df8c7636163068.zip
implement fakebank withdrawal
Diffstat (limited to 'packages/taler-util/src/walletTypes.ts')
-rw-r--r--packages/taler-util/src/walletTypes.ts28
1 files changed, 22 insertions, 6 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts
index 63ece1e6..6e68ee08 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -590,11 +590,11 @@ export interface GetExchangeTosResult {
* if any.
*/
acceptedEtag: string | undefined;
-
+
/**
* Accepted content type
*/
- contentType: string;
+ contentType: string;
}
export interface TestPayArgs {
@@ -658,9 +658,9 @@ export interface GetExchangeTosRequest {
export const codecForGetExchangeTosRequest = (): Codec<GetExchangeTosRequest> =>
buildCodecForObject<GetExchangeTosRequest>()
- .property("exchangeBaseUrl", codecForString())
- .property("acceptedFormat", codecOptional(codecForList(codecForString())))
- .build("GetExchangeTosRequest");
+ .property("exchangeBaseUrl", codecForString())
+ .property("acceptedFormat", codecOptional(codecForList(codecForString())))
+ .build("GetExchangeTosRequest");
export interface AcceptManualWithdrawalRequest {
exchangeBaseUrl: string;
@@ -734,7 +734,10 @@ export const codecForGetExchangeWithdrawalInfo = (): Codec<GetExchangeWithdrawal
buildCodecForObject<GetExchangeWithdrawalInfo>()
.property("exchangeBaseUrl", codecForString())
.property("amount", codecForAmountJson())
- .property("tosAcceptedFormat", codecOptional(codecForList(codecForString())))
+ .property(
+ "tosAcceptedFormat",
+ codecOptional(codecForList(codecForString())),
+ )
.build("GetExchangeWithdrawalInfo");
export interface AbortProposalRequest {
@@ -1029,3 +1032,16 @@ export const codecForSetWalletDeviceIdRequest = (): Codec<SetWalletDeviceIdReque
buildCodecForObject<SetWalletDeviceIdRequest>()
.property("walletDeviceId", codecForString())
.build("SetWalletDeviceIdRequest");
+
+export interface WithdrawFakebankRequest {
+ amount: AmountString;
+ exchange: string;
+ bank: string;
+}
+
+export const codecForWithdrawFakebankRequest = (): Codec<WithdrawFakebankRequest> =>
+ buildCodecForObject<WithdrawFakebankRequest>()
+ .property("amount", codecForAmountString())
+ .property("bank", codecForString())
+ .property("exchange", codecForString())
+ .build("WithdrawFakebankRequest");