diff options
author | Florian Dold <florian@dold.me> | 2024-02-27 17:44:46 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-02-27 17:44:46 +0100 |
commit | f08798520ef9b8b0ff36c6aaf93653605b53b912 (patch) | |
tree | 7b85598504d5b92fdda592153f1b8155abdbf363 | |
parent | 523280b3862b528512ff93c651bc0d9ed632fbf6 (diff) | |
download | wallet-core-f08798520ef9b8b0ff36c6aaf93653605b53b912.tar.xz |
more observability
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 6 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/exchanges.ts | 6 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index a8a2e2ba0..e676f3950 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -826,13 +826,9 @@ exchangesCli .requiredArgument("url", clk.STRING, { help: "Base URL of the exchange.", }) - .requiredArgument("etag", clk.STRING, { - help: "ToS version tag to accept", - }) .action(async (args) => { await withWallet(args, async (wallet) => { await wallet.client.call(WalletApiOperation.SetExchangeTosAccepted, { - etag: args.exchangesAcceptTosCmd.etag, exchangeBaseUrl: args.exchangesAcceptTosCmd.url, }); }); @@ -1221,7 +1217,7 @@ advancedCli help: "Initialize the wallet (with DB) and exit.", }) .action(async (args) => { - await withWallet(args, async () => { }); + await withWallet(args, async () => {}); }); advancedCli diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts index a26b3f5ca..4453123fa 100644 --- a/packages/taler-wallet-core/src/exchanges.ts +++ b/packages/taler-wallet-core/src/exchanges.ts @@ -415,10 +415,10 @@ export async function acceptExchangeTermsOfService( * Mark the current ToS version as accepted by the user. */ export async function forgetExchangeTermsOfService( - ws: InternalWalletState, + wex: WalletExecutionContext, exchangeBaseUrl: string, ): Promise<void> { - const notif = await ws.db.runReadWriteTx( + const notif = await wex.db.runReadWriteTx( ["exchangeDetails", "exchanges"], async (tx) => { const exch = await tx.exchanges.get(exchangeBaseUrl); @@ -439,7 +439,7 @@ export async function forgetExchangeTermsOfService( }, ); if (notif) { - ws.notify(notif); + wex.ws.notify(notif); } } diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 236b27575..a779fdcec 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -875,7 +875,7 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>( } case WalletApiOperation.SetExchangeTosForgotten: { const req = codecForAcceptExchangeTosRequest().decode(payload); - await forgetExchangeTermsOfService(ws, req.exchangeBaseUrl); + await forgetExchangeTermsOfService(wex, req.exchangeBaseUrl); return {}; } case WalletApiOperation.AcceptBankIntegratedWithdrawal: { |