From d483a3f5574355ed9c43eb6ddea59e5734323cf0 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 19 Apr 2023 12:42:47 -0300
Subject: fix #7704

---
 .../src/components/ErrorTalerOperation.tsx                         | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx')

diff --git a/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx b/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx
index f8203f38a..2979c28e5 100644
--- a/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx
+++ b/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx
@@ -17,8 +17,8 @@ import { TalerErrorDetail, TranslatedString } from "@gnu-taler/taler-util";
 import { Fragment, h, VNode } from "preact";
 import { useState } from "preact/hooks";
 import arrowDown from "../svg/chevron-down.svg";
-import { useDevContext } from "../context/devContext.js";
 import { ErrorBox } from "./styled/index.js";
+import { EnabledBySettings } from "./EnabledBySettings.js";
 
 export function ErrorTalerOperation({
   title,
@@ -27,7 +27,6 @@ export function ErrorTalerOperation({
   title?: TranslatedString;
   error?: TalerErrorDetail;
 }): VNode | null {
-  const { devMode } = useDevContext();
   const [showErrorDetail, setShowErrorDetail] = useState(false);
 
   if (!title || !error) return null;
@@ -62,11 +61,11 @@ export function ErrorTalerOperation({
               <b>{error.hint}</b> {!errorHint ? "" : `: ${errorHint}`}{" "}
             </div>
           </div>
-          {devMode && (
+          <EnabledBySettings name="showJsonOnError">
             <div style={{ textAlign: "left", overflowX: "auto" }}>
               <pre>{JSON.stringify(error, undefined, 2)}</pre>
             </div>
-          )}
+          </EnabledBySettings>
         </Fragment>
       )}
     </ErrorBox>
-- 
cgit v1.2.3

