diff options
author | Florian Dold <florian@dold.me> | 2023-10-10 15:08:59 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-10-10 15:08:59 +0200 |
commit | 47fdfc64a2e6a99a44f87974e608bdac5de83759 (patch) | |
tree | 3c4bcc4e7ee813a9c7e28c7205f573eac42e2332 /packages/taler-util/src/wallet-types.ts | |
parent | adda4f8ce38ce030f55855bc0d66443d08153480 (diff) | |
download | wallet-core-47fdfc64a2e6a99a44f87974e608bdac5de83759.tar.xz |
wallet-core: return mock currency specification for KUDOS and TESTKUDOS
Diffstat (limited to 'packages/taler-util/src/wallet-types.ts')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 4811d674f..9a4e15ae1 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -415,24 +415,28 @@ export const codecForScopeInfo = (): Codec<ScopeInfo> => .alternative(ScopeType.Auditor, codecForScopeInfoAuditor()) .build("ScopeInfo"); -export interface GetCurrencyInfoRequest { +export interface GetCurrencySpecificationRequest { scope: ScopeInfo; } export const codecForGetCurrencyInfoRequest = - (): Codec<GetCurrencyInfoRequest> => - buildCodecForObject<GetCurrencyInfoRequest>() + (): Codec<GetCurrencySpecificationRequest> => + buildCodecForObject<GetCurrencySpecificationRequest>() .property("scope", codecForScopeInfo()) - .build("GetCurrencyInfoRequest"); + .build("GetCurrencySpecificationRequest"); -export interface GetCurrencyInfoResponse { - decimalSeparator: string; - numFractionalDigits: number; - numTinyDigits: number; - /** - * Is the currency name leading or trailing? - */ - isCurrencyNameLeading: boolean; +export interface GetCurrencySpecificationResponse { + currencySpecification: CurrencySpecification; +} + +export interface CurrencySpecification { + decimal_separator: string; + fractional_input_digits: number; + fractional_normal_digits: number; + fractional_trailing_zero_digits: number; + is_currency_name_leading: boolean; + name: string; + alt_unit_names: { [n: number]: string }; } export interface InitRequest { @@ -1605,10 +1609,11 @@ export interface UpdateExchangeEntryRequest { exchangeBaseUrl: string; } -export const codecForUpdateExchangeEntryRequest = (): Codec<UpdateExchangeEntryRequest> => - buildCodecForObject<UpdateExchangeEntryRequest>() - .property("exchangeBaseUrl", codecForString()) - .build("UpdateExchangeEntryRequest"); +export const codecForUpdateExchangeEntryRequest = + (): Codec<UpdateExchangeEntryRequest> => + buildCodecForObject<UpdateExchangeEntryRequest>() + .property("exchangeBaseUrl", codecForString()) + .build("UpdateExchangeEntryRequest"); export interface ForceExchangeUpdateRequest { exchangeBaseUrl: string; |