diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/TermsOfService')
-rw-r--r-- | packages/taler-wallet-webextension/src/components/TermsOfService/index.ts | 2 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/components/TermsOfService/state.ts | 19 |
2 files changed, 12 insertions, 9 deletions
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 |