diff options
author | Florian Dold <florian@dold.me> | 2023-08-05 23:34:25 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-08-05 23:34:37 +0200 |
commit | 6286699f26f486a9406827ef7359f62896a2dada (patch) | |
tree | 6f8deeb955c7bf3792b75c72544280c13feee5d3 /packages/taler-wallet-core/src | |
parent | 308a4282cbdde7376d88ca76e3eca967a1f02c46 (diff) | |
download | wallet-core-6286699f26f486a9406827ef7359f62896a2dada.tar.xz |
-validation
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/wallet-api-types.ts | 8 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts b/packages/taler-wallet-core/src/wallet-api-types.ts index 0c9755a3a..36c4809af 100644 --- a/packages/taler-wallet-core/src/wallet-api-types.ts +++ b/packages/taler-wallet-core/src/wallet-api-types.ts @@ -212,7 +212,7 @@ export enum WalletApiOperation { ApplyDevExperiment = "applyDevExperiment", ValidateIban = "validateIban", TestingWaitTransactionsFinal = "testingWaitTransactionsFinal", - GetCurrencyInfo = "getCurrencyInfo", + GetScopedCurrencyInfo = "getScopedCurrencyInfo", } // group: Initialization @@ -604,8 +604,8 @@ export type ListCurrenciesOp = { response: WalletCurrencyInfo; }; -export type GetCurrencyInfoOp = { - op: WalletApiOperation.GetCurrencyInfo; +export type GetScopedCurrencyInfoOp = { + op: WalletApiOperation.GetScopedCurrencyInfo; request: GetCurrencyInfoRequest; response: GetCurrencyInfoResponse; }; @@ -1081,7 +1081,7 @@ export type WalletOperations = { [WalletApiOperation.ApplyDevExperiment]: ApplyDevExperimentOp; [WalletApiOperation.ValidateIban]: ValidateIbanOp; [WalletApiOperation.TestingWaitTransactionsFinal]: TestingWaitTransactionsFinal; - [WalletApiOperation.GetCurrencyInfo]: GetCurrencyInfoOp; + [WalletApiOperation.GetScopedCurrencyInfo]: GetScopedCurrencyInfoOp; }; export type WalletCoreRequestType< diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 81ea26260..dfa41d60e 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -119,6 +119,7 @@ import { validateIban, codecForSharePaymentRequest, GetCurrencyInfoResponse, + codecForGetCurrencyInfoRequest, } from "@gnu-taler/taler-util"; import { HttpRequestLibrary, @@ -1396,7 +1397,10 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>( const resp = await getBackupRecovery(ws); return resp; } - case WalletApiOperation.GetCurrencyInfo: { + case WalletApiOperation.GetScopedCurrencyInfo: { + logger.info(`payload: ${j2s(payload)}`); + // Ignore result, just validate in this mock implementation + codecForGetCurrencyInfoRequest().decode(payload); const resp: GetCurrencyInfoResponse = { decimalSeparator: ",", isCurrencyNameLeading: false, |