diff options
author | Florian Dold <florian@dold.me> | 2021-10-14 11:36:43 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-10-14 11:36:43 +0200 |
commit | c53264869451ccbfbaf1976e01df8c7636163068 (patch) | |
tree | a6f4359d4fcd558ee443991111404bc095642e5b /packages/taler-util/src | |
parent | 6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202 (diff) | |
download | wallet-core-c53264869451ccbfbaf1976e01df8c7636163068.tar.xz |
implement fakebank withdrawal
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r-- | packages/taler-util/src/walletTypes.ts | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts index 63ece1e60..6e68ee080 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"); |