diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet')
3 files changed, 12 insertions, 6 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderDetail.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderDetail.stories.tsx index cd6af6214..fbaa0b0ea 100644 --- a/packages/taler-wallet-webextension/src/wallet/ProviderDetail.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ProviderDetail.stories.tsx @@ -19,7 +19,11 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { AbsoluteTime, TalerPreciseTimestamp, TalerProtocolTimestamp } from "@gnu-taler/taler-util"; +import { + AbsoluteTime, + TalerPreciseTimestamp, + TalerProtocolTimestamp, +} from "@gnu-taler/taler-util"; import { ProviderPaymentType } from "@gnu-taler/taler-wallet-core"; import * as tests from "@gnu-taler/web-util/testing"; import { ProviderView as TestedComponent } from "./ProviderDetailPage.js"; diff --git a/packages/taler-wallet-webextension/src/wallet/Settings.tsx b/packages/taler-wallet-webextension/src/wallet/Settings.tsx index e6c95182c..6ca443d10 100644 --- a/packages/taler-wallet-webextension/src/wallet/Settings.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Settings.tsx @@ -320,9 +320,9 @@ function AdvanceSettings(): VNode { label: i18n.str`Show backup feature`, description: i18n.str`Backup integration still in beta.`, }, - deleteActiveTransactions: { - label: i18n.str`Show delete active transaction`, - description: i18n.str`Deleting active transaction is not safe and you may loose your coins.`, + suspendIndividualTransaction: { + label: i18n.str`Show suspend/resume transaction`, + description: i18n.str`Prevent transaction from doing network request.`, }, extendedAccountTypes: { label: i18n.str`Show more account types on deposit`, diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index 7b4cf964f..d198893cd 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -71,6 +71,7 @@ import { SafeHandler } from "../mui/handlers.js"; import { Pages } from "../NavigationBar.js"; import { assertUnreachable } from "../utils/index.js"; import { EnabledBySettings } from "../components/EnabledBySettings.js"; +import { useSettings } from "../hooks/useSettings.js"; interface Props { tid: string; @@ -203,6 +204,7 @@ function TransactionTemplate({ const [confirmBeforeForget, setConfirmBeforeForget] = useState(false); const [confirmBeforeCancel, setConfirmBeforeCancel] = useState(false); const { safely } = useAlertContext(); + const [settings] = useSettings(); async function doCheckBeforeForget(): Promise<void> { if ( @@ -393,7 +395,7 @@ function TransactionTemplate({ <i18n.Translate>Abort</i18n.Translate> </Button> )} - {showResume && ( + {showResume && settings.suspendIndividualTransaction && ( <Button variant="contained" onClick={safely("resume transaction", onResume)} @@ -401,7 +403,7 @@ function TransactionTemplate({ <i18n.Translate>Resume</i18n.Translate> </Button> )} - {showSuspend && ( + {showSuspend && settings.suspendIndividualTransaction && ( <Button variant="contained" onClick={safely("suspend transaction", onSuspend)} |