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