diff --git a/src/app/screens/Send/index.tsx b/src/app/screens/Send/index.tsx index e5f52d95d7..4d9943ab85 100644 --- a/src/app/screens/Send/index.tsx +++ b/src/app/screens/Send/index.tsx @@ -10,12 +10,7 @@ import { useTranslation } from "react-i18next"; import { useLocation, useNavigate } from "react-router-dom"; import QrcodeAdornment from "~/app/components/QrcodeAdornment"; import toast from "~/app/components/Toast"; -import { useAccount } from "~/app/context/AccountContext"; -import { - extractLightningTagData, - isAlbyOAuthAccount, - isBitcoinAddress, -} from "~/app/utils"; +import { extractLightningTagData, isBitcoinAddress } from "~/app/utils"; import lnurlLib from "~/common/lib/lnurl"; import { isLNURLDetailsError } from "~/common/utils/typeHelpers"; @@ -27,10 +22,6 @@ function Send() { const [invoice, setInvoice] = useState(location.state?.decodedQR || ""); const navigate = useNavigate(); const [loading, setLoading] = useState(false); - const auth = useAccount(); - const hint = !isAlbyOAuthAccount(auth.account?.connectorType) - ? t("input.hint") - : t("input.hint_with_bitcoin_address"); function isPubKey(str: string) { return str.length == 66 && (str.startsWith("02") || str.startsWith("03")); @@ -100,10 +91,7 @@ function Send() { }, }, }); - } else if ( - isAlbyOAuthAccount(auth.account?.connectorType) && - isBitcoinAddress(invoice) - ) { + } else if (isBitcoinAddress(invoice)) { navigate("/sendToBitcoinAddress", { state: { args: { bitcoinAddress: invoice } }, }); @@ -144,7 +132,7 @@ function Send() { )} - {step == "success" && ( )} + {step == "unavailable" && ( + + + Built-in swaps are currently unavailable. You can use one of the + following swap providers in the meantime: + + + + + + + )} ); @@ -399,6 +430,43 @@ function SendToBitcoinAddress() { export default SendToBitcoinAddress; +// Define the types for the component props +interface ExchangeLinkProps { + href: string; + imageSrc: string; + title: string; + description: string; +} + +const ExchangeLink: React.FC = ({ + href, + imageSrc, + title, + description, +}) => { + return ( + +
+
+ image +
+

+ {title} +

+

+ {description} +

+
+
+
+
+ ); +}; + type BitcoinAddressProps = { address: string; }; diff --git a/static/assets/icons/swap/boltz.png b/static/assets/icons/swap/boltz.png new file mode 100644 index 0000000000..ec4ffd8c44 Binary files /dev/null and b/static/assets/icons/swap/boltz.png differ diff --git a/static/assets/icons/swap/deezy.svg b/static/assets/icons/swap/deezy.svg new file mode 100644 index 0000000000..cd94861a31 --- /dev/null +++ b/static/assets/icons/swap/deezy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/assets/icons/swap/fixedfloat.png b/static/assets/icons/swap/fixedfloat.png new file mode 100644 index 0000000000..ae3c480826 Binary files /dev/null and b/static/assets/icons/swap/fixedfloat.png differ diff --git a/static/assets/icons/swap/sideshift.svg b/static/assets/icons/swap/sideshift.svg new file mode 100644 index 0000000000..3fe098f415 --- /dev/null +++ b/static/assets/icons/swap/sideshift.svg @@ -0,0 +1 @@ + \ No newline at end of file