commit 316c43a169bd52c8dcdfb9a3894e66b9c650ca85
parent ae2c24271d7bab08cda6b6e3116bb50b22862d81
Author: Florian Dold <florian@dold.me>
Date: Mon, 1 Jul 2024 14:32:44 +0200
-handlers WIP
Diffstat:
1 file changed, 36 insertions(+), 0 deletions(-)
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
@@ -1446,6 +1446,42 @@ const handlers: { [T in WalletApiOperation]: HandlerWithValidator<T> } = {
codec: codecForTransactionByIdRequest(),
handler: getTransactionById,
},
+ [WalletApiOperation.GetWithdrawalTransactionByUri]: {
+ codec: codecForGetWithdrawalDetailsForUri(),
+ handler: getWithdrawalTransactionByUri,
+ },
+ [WalletApiOperation.AddExchange]: {
+ codec: codecForAddExchangeRequest(),
+ handler: handleAddExchange,
+ },
+ [WalletApiOperation.TestingPing]: {
+ codec: codecForEmptyObject(),
+ handler: async () => ({}),
+ },
+ [WalletApiOperation.UpdateExchangeEntry]: {
+ codec: codecForUpdateExchangeEntryRequest(),
+ handler: handleUpdateExchangeEntry,
+ },
+ [WalletApiOperation.TestingGetDenomStats]: {
+ codec: codecForTestingGetDenomStatsRequest(),
+ handler: handleTestingGetDenomStats,
+ },
+ [WalletApiOperation.ListExchanges]: {
+ codec: codecForEmptyObject(),
+ handler: listExchanges,
+ },
+ [WalletApiOperation.GetExchangeEntryByUrl]: {
+ codec: codecForGetExchangeEntryByUrlRequest(),
+ handler: lookupExchangeByUri,
+ },
+ [WalletApiOperation.ListExchangesForScopedCurrency]: {
+ codec: codecForListExchangesForScopedCurrencyRequest(),
+ handler: handleListExchangesForScopedCurrency,
+ },
+ [WalletApiOperation.GetExchangeDetailedInfo]: {
+ codec: codecForAddExchangeRequest(),
+ handler: (wex, req) => getExchangeDetailedInfo(wex, req.exchangeBaseUrl),
+ },
};
/**