import Link from 'next/link' import Button from 'react-bootstrap/Button' import { useInvoiceable } from './invoice' import { Alert } from 'react-bootstrap' import { useState } from 'react' export default function FundError ({ onClose, amount, onPayment }) { const [error, setError] = useState(null) const createInvoice = useInvoiceable(onPayment, { forceInvoice: true }) return ( <> {error && setError(undefined)} dismissible>{error}}

you need more sats

or
) } export const isInsufficientFundsError = (error) => { if (Array.isArray(error)) { return error.some(({ message }) => message.includes('insufficient funds')) } return error.toString().includes('insufficient funds') }