diff options
author | Florian Dold <florian@dold.me> | 2022-09-05 21:09:28 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-05 21:09:28 +0200 |
commit | 3f5a76751b3bf410ea3df023eef2f5bfd6f730cd (patch) | |
tree | 7ed7bc46035e557ad6eeb9647980d0a60eb7621c /packages/taler-util | |
parent | 0f57f48f847a7bd0b35ddc05770aa169fec1c136 (diff) | |
download | wallet-core-0.9.0-dev.16.tar.xz |
wallet-core: make listExchanges return less datav0.9.0-dev.16
Since the webextension UI depends on the full response, we have a
temporary listExchangesDetailled request.
See https://bugs.taler.net/n/7323 for details.
Diffstat (limited to 'packages/taler-util')
-rw-r--r-- | packages/taler-util/src/walletTypes.ts | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts index 94a988c67..095266f22 100644 --- a/packages/taler-util/src/walletTypes.ts +++ b/packages/taler-util/src/walletTypes.ts @@ -571,6 +571,11 @@ export interface DepositInfo { export interface ExchangesListRespose { exchanges: ExchangeListItem[]; } + +export interface ExchangeDetailledListRespose { + exchanges: ExchangeFullDetailsListItem[]; +} + export interface WalletCoreVersion { hash: string | undefined; version: string; @@ -578,6 +583,7 @@ export interface WalletCoreVersion { merchant: string; bank: string; } + export interface KnownBankAccounts { accounts: { [payto: string]: PaytoUri }; } @@ -727,7 +733,7 @@ export interface DenominationInfo { stampExpireDeposit: TalerProtocolTimestamp; } -export interface ExchangeListItem { +export interface ExchangeFullDetailsListItem { exchangeBaseUrl: string; currency: string; paytoUris: string[]; @@ -737,6 +743,13 @@ export interface ExchangeListItem { denominations: DenominationInfo[]; } +export interface ExchangeListItem { + exchangeBaseUrl: string; + currency: string; + paytoUris: string[]; + tos: ExchangeTos; +} + const codecForAuditorDenomSig = (): Codec<AuditorDenomSig> => buildCodecForObject<AuditorDenomSig>() .property("denom_pub_h", codecForString()) @@ -758,20 +771,29 @@ const codecForExchangeTos = (): Codec<ExchangeTos> => .property("content", codecOptional(codecForString())) .build("ExchangeTos"); +export const codecForExchangeFullDetailsListItem = + (): Codec<ExchangeFullDetailsListItem> => + buildCodecForObject<ExchangeFullDetailsListItem>() + .property("currency", codecForString()) + .property("exchangeBaseUrl", codecForString()) + .property("paytoUris", codecForList(codecForString())) + .property("tos", codecForExchangeTos()) + .property("auditors", codecForList(codecForExchangeAuditor())) + .property("wireInfo", codecForWireInfo()) + .property("denominations", codecForList(codecForDenominationInfo())) + .build("ExchangeListItem"); + export const codecForExchangeListItem = (): Codec<ExchangeListItem> => buildCodecForObject<ExchangeListItem>() .property("currency", codecForString()) .property("exchangeBaseUrl", codecForString()) .property("paytoUris", codecForList(codecForString())) .property("tos", codecForExchangeTos()) - .property("auditors", codecForList(codecForExchangeAuditor())) - .property("wireInfo", codecForWireInfo()) - .property("denominations", codecForList(codecForDenominationInfo())) .build("ExchangeListItem"); export const codecForExchangesListResponse = (): Codec<ExchangesListRespose> => buildCodecForObject<ExchangesListRespose>() - .property("exchanges", codecForList(codecForExchangeListItem())) + .property("exchanges", codecForList(codecForExchangeFullDetailsListItem())) .build("ExchangesListRespose"); export interface AcceptManualWithdrawalResult { |