diff options
author | Sebastian <sebasjm@gmail.com> | 2023-01-09 20:20:09 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-01-09 20:20:09 -0300 |
commit | 4a781bd0dd8828ce152f6ab2c3f1bbd6b5e826f7 (patch) | |
tree | 5c16976f99eb973ff62d78ed64107ca01df57b99 /packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx | |
parent | 8a70edb2f8e235c3462127b0aa4e1b65aa1aee0b (diff) | |
download | wallet-core-4a781bd0dd8828ce152f6ab2c3f1bbd6b5e826f7.tar.xz |
fix #7153: more error handling
if handler do not trap error then fail at compile time,
all safe handlers push alert on error
errors are typed so they render good information
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx b/packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx index 6a9ab3cf7..9a748891c 100644 --- a/packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx +++ b/packages/taler-wallet-webextension/src/cta/InvoicePay/views.tsx @@ -16,11 +16,10 @@ import { Fragment, h, VNode } from "preact"; import { Amount } from "../../components/Amount.js"; -import { ErrorTalerOperation } from "../../components/ErrorTalerOperation.js"; import { LogoHeader } from "../../components/LogoHeader.js"; import { Part } from "../../components/Part.js"; import { PaymentButtons } from "../../components/PaymentButtons.js"; -import { Link, SubTitle, WalletAction } from "../../components/styled/index.js"; +import { SubTitle, WalletAction } from "../../components/styled/index.js"; import { Time } from "../../components/Time.js"; import { useTranslationContext } from "../../context/translation.js"; import { State } from "./index.js"; @@ -29,29 +28,14 @@ export function ReadyView( state: State.Ready | State.NoBalanceForCurrency | State.NoEnoughBalance, ): VNode { const { i18n } = useTranslationContext(); - const { - operationError, - summary, - amount, - expiration, - uri, - status, - balance, - payStatus, - cancel, - } = state; + const { summary, amount, expiration, uri, status, balance, payStatus } = + state; return ( <WalletAction> <LogoHeader /> <SubTitle> <i18n.Translate>Digital invoice</i18n.Translate> </SubTitle> - {operationError && ( - <ErrorTalerOperation - title={i18n.str`Could not finish the payment operation`} - error={operationError} - /> - )} <section style={{ textAlign: "left" }}> <Part title={i18n.str`Subject`} text={<div>{summary}</div>} /> <Part title={i18n.str`Amount`} text={<Amount value={amount} />} /> |