From 1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 16 Nov 2022 16:04:52 -0300 Subject: fix #7411, also making the backup payment visible --- .../src/components/TermsOfService/index.ts | 2 +- .../src/components/TermsOfService/state.ts | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'packages/taler-wallet-webextension/src/components/TermsOfService') diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/index.ts b/packages/taler-wallet-webextension/src/components/TermsOfService/index.ts index 79778a595..4d2c4346e 100644 --- a/packages/taler-wallet-webextension/src/components/TermsOfService/index.ts +++ b/packages/taler-wallet-webextension/src/components/TermsOfService/index.ts @@ -26,7 +26,7 @@ import { LoadingUriView, ShowButtonsAcceptedTosView, ShowButtonsNonAcceptedTosView, - ShowTosContentView + ShowTosContentView, } from "./views.js"; export interface Props { diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/state.ts b/packages/taler-wallet-webextension/src/components/TermsOfService/state.ts index 3cad967ae..c5be71ef0 100644 --- a/packages/taler-wallet-webextension/src/components/TermsOfService/state.ts +++ b/packages/taler-wallet-webextension/src/components/TermsOfService/state.ts @@ -35,10 +35,13 @@ export function useComponentState( * For the exchange selected, bring the status of the terms of service */ const terms = useAsyncAsHook(async () => { - const exchangeTos = await api.wallet.call(WalletApiOperation.GetExchangeTos, { - exchangeBaseUrl: exchangeUrl, - acceptedFormat: ["text/xml"] - }) + const exchangeTos = await api.wallet.call( + WalletApiOperation.GetExchangeTos, + { + exchangeBaseUrl: exchangeUrl, + acceptedFormat: ["text/xml"], + }, + ); const state = buildTermsOfServiceState(exchangeTos); @@ -78,14 +81,14 @@ export function useComponentState( if (accepted) { api.wallet.call(WalletApiOperation.SetExchangeTosAccepted, { exchangeBaseUrl: exchangeUrl, - etag: state.version - }) + etag: state.version, + }); } else { // mark as not accepted api.wallet.call(WalletApiOperation.SetExchangeTosAccepted, { exchangeBaseUrl: exchangeUrl, - etag: undefined - }) + etag: undefined, + }); } // setAccepted(accepted); if (!readOnly) onChange(accepted); //external update -- cgit v1.2.3