aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/components/TermsOfService
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-11-16 16:04:52 -0300
committerSebastian <sebasjm@gmail.com>2022-11-16 16:05:13 -0300
commit1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e (patch)
tree7255cf4a5b51af4807e2a01a370497413a78968f /packages/taler-wallet-webextension/src/components/TermsOfService
parent53164dc47b1138235a0c797affaa6fb37ea43239 (diff)
downloadwallet-core-1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e.tar.xz
fix #7411, also making the backup payment visible
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/TermsOfService')
-rw-r--r--packages/taler-wallet-webextension/src/components/TermsOfService/index.ts2
-rw-r--r--packages/taler-wallet-webextension/src/components/TermsOfService/state.ts19
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