diff --git a/src/hooks/useFundingFormState.tsx b/src/hooks/useFundingFormState.tsx index feb6d0f5e..9a12d5887 100644 --- a/src/hooks/useFundingFormState.tsx +++ b/src/hooks/useFundingFormState.tsx @@ -100,7 +100,9 @@ export const useFundingFormState = ({ rewards, rewardCurrency, walletLimits }: U if (onChain?.max && debouncedTotalAmount > onChain.max) { setAmountWarning( - `can be funded via. Lightning invoice only. amount exceeds onChain max: ${commaFormatted(onChain.max)} sats`, + `The maximum amount for on-chain contributions is ${commaFormatted( + onChain.max, + )} Sats. For higher amounts, you can pay with Lightning.`, ) setAmountError('') return @@ -108,9 +110,9 @@ export const useFundingFormState = ({ rewards, rewardCurrency, walletLimits }: U if (onChain?.min && debouncedTotalAmount < onChain.min) { setAmountWarning( - `can be funded via. Lightning invoice only. amount is lower than onChain min: ${commaFormatted( + `The minimum amount for on-chain contributions is ${commaFormatted( onChain.min, - )} sats`, + )} Sats. For smaller amounts, you can pay with Lightning.`, ) setAmountError('') return diff --git a/src/modules/project/pages/projectView/views/projectActivityPanel/screens/qr/components/PaymentMethodSelection.tsx b/src/modules/project/pages/projectView/views/projectActivityPanel/screens/qr/components/PaymentMethodSelection.tsx index 5e2237858..f35d4c6f3 100644 --- a/src/modules/project/pages/projectView/views/projectActivityPanel/screens/qr/components/PaymentMethodSelection.tsx +++ b/src/modules/project/pages/projectView/views/projectActivityPanel/screens/qr/components/PaymentMethodSelection.tsx @@ -1,6 +1,7 @@ -import { Button, HStack } from '@chakra-ui/react' +import { Button, HStack, Tooltip } from '@chakra-ui/react' import { useTranslation } from 'react-i18next' +import { useFundingContext } from '../../../../../../../context' import { useRefundFileValue } from '../../../../../../../funding/state' import { PaymentMethods, usePaymentMethodAtom } from '../states/paymentMethodAtom' @@ -8,12 +9,13 @@ export const PaymentMethodSelection = () => { const { t } = useTranslation() const [paymentMethod, setPaymentMethod] = usePaymentMethodAtom() + const { + fundForm: { amountWarning }, + } = useFundingContext() const refundFile = useRefundFileValue() const isLightning = paymentMethod === PaymentMethods.lightning - console.log('checking refundFile', refundFile) - return ( - + + + ) }