From c09caa5fdca91fb6ded6b2ce8caf1620c0273b80 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 19 Mar 2024 23:02:24 -0300 Subject: wip, found #8653 --- .../src/components/PaymentButtons.tsx | 26 +++++++++------------- .../ShowFullContractTermPopup.stories.tsx | 1 - .../src/components/ShowFullContractTermPopup.tsx | 16 ++----------- 3 files changed, 12 insertions(+), 31 deletions(-) (limited to 'packages/taler-wallet-webextension/src/components') diff --git a/packages/taler-wallet-webextension/src/components/PaymentButtons.tsx b/packages/taler-wallet-webextension/src/components/PaymentButtons.tsx index 8eb3c6e7a..7fa0376c9 100644 --- a/packages/taler-wallet-webextension/src/components/PaymentButtons.tsx +++ b/packages/taler-wallet-webextension/src/components/PaymentButtons.tsx @@ -80,39 +80,34 @@ export function PaymentButtons({ case "age-acceptable": { BalanceMessage = i18n.str`Balance is not enough because you have ${Amounts.stringifyValue( payStatus.balanceDetails.balanceAgeAcceptable, - )} ${amount.currency} to pay for contracts restricted for age above ${ - payStatus.contractTerms.minimum_age - } years old`; + )} ${amount.currency} to pay for this contract which is restricted.`; break; } case "available": { BalanceMessage = i18n.str`Balance is not enough because you have ${Amounts.stringifyValue( payStatus.balanceDetails.balanceAvailable, - )} ${amount.currency} available.`; + )} ${amount.currency} available.`; break; } case "merchant-acceptable": { BalanceMessage = i18n.str`Balance is not enough because merchant will just accept ${Amounts.stringifyValue( payStatus.balanceDetails.balanceReceiverAcceptable, - )} ${ - amount.currency - } . To know more you can check which exchange and auditors the merchant trust.`; + )} ${amount.currency + } . To know more you can check which exchange and auditors the merchant trust.`; break; } case "merchant-depositable": { BalanceMessage = i18n.str`Balance is not enough because merchant will just accept ${Amounts.stringifyValue( payStatus.balanceDetails.balanceReceiverDepositable, - )} ${ - amount.currency - } . To know more you can check which wire methods the merchant accepts.`; + )} ${amount.currency + } . To know more you can check which wire methods the merchant accepts.`; break; } case "material": { BalanceMessage = i18n.str`Balance is not enough because you have ${Amounts.stringifyValue( payStatus.balanceDetails.balanceMaterial, - )} ${ - amount.currency - } to spend right know. There are some coins that need to be refreshed.`; + )} ${amount.currency + } to spend right know. There are some coins that need to be refreshed.`; break; } case "fee-gap": { @@ -123,9 +118,8 @@ export function PaymentButtons({ payStatus.balanceDetails.maxEffectiveSpendAmount, ).amount, ), - )} ${ - amount.currency - } more balance in your wallet or ask your merchant to cover more of the fees.`; + )} ${amount.currency + } more balance in your wallet or ask your merchant to cover more of the fees.`; break; } default: diff --git a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx index 7142089cb..99e2d0a76 100644 --- a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx +++ b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.stories.tsx @@ -48,7 +48,6 @@ const cd: WalletContractData = { refundDeadline: { t_s: 1660002673, }, - wireFeeAmortization: 1, allowedExchanges: [ { exchangeBaseUrl: "https://exchange.taler.ar/", diff --git a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx index 6346b475a..b0f43d0d9 100644 --- a/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx +++ b/packages/taler-wallet-webextension/src/components/ShowFullContractTermPopup.tsx @@ -337,8 +337,8 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode { !contractTerms.autoRefund ? Duration.getZero() : Duration.fromTalerProtocolDuration( - contractTerms.autoRefund, - ), + contractTerms.autoRefund, + ), )} format="dd MMMM yyyy, HH:mm" /> @@ -384,24 +384,12 @@ export function ShowView({ contractTerms, hideHandler }: States.Show): VNode { - - - Minimum age - - {contractTerms.minimumAge} - {/* Extra
{contractTerms.}
*/} - - - Wire fee amortization - - {contractTerms.wireFeeAmortization} - Exchanges -- cgit v1.2.3