diff --git a/src/app/router/Options/Options.tsx b/src/app/router/Options/Options.tsx index f9fc4ea293..e587a24700 100644 --- a/src/app/router/Options/Options.tsx +++ b/src/app/router/Options/Options.tsx @@ -25,6 +25,7 @@ import Providers from "~/app/context/Providers"; import RequireAuth from "~/app/router/RequireAuth"; import { getConnectorRoutes, renderRoutes } from "~/app/router/connectorRoutes"; import Discover from "~/app/screens/Discover"; +import OnChainReceive from "~/app/screens/OnChainReceive"; import AlbyWalletCreate from "~/app/screens/connectors/AlbyWallet/create"; import AlbyWalletLogin from "~/app/screens/connectors/AlbyWallet/login"; import ChooseConnector from "~/app/screens/connectors/ChooseConnector"; @@ -66,6 +67,7 @@ function Options() { } /> } /> } /> + } /> } /> } /> } /> } /> + } /> } /> } /> } /> diff --git a/src/app/screens/OnChainReceive/index.tsx b/src/app/screens/OnChainReceive/index.tsx new file mode 100644 index 0000000000..50cb5a9567 --- /dev/null +++ b/src/app/screens/OnChainReceive/index.tsx @@ -0,0 +1,66 @@ +import { CaretLeftIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; +import Header from "@components/Header"; +import { Trans, useTranslation } from "react-i18next"; +import { useNavigate } from "react-router-dom"; +import Button from "~/app/components/Button"; +import Container from "~/app/components/Container"; +import IconButton from "~/app/components/IconButton"; + +export default function OnChainReceive() { + const navigate = useNavigate(); + const { t } = useTranslation("translation", { + keyPrefix: "on_chain", + }); + + return ( +
+
{ + navigate(-1); + }} + icon={} + /> + } + /> +
+ +
+
+

+ ]} + /> +

+
+ +
+

+ ]} + /> +

+
+
+
+
+
+
+
+ ); +} diff --git a/src/app/screens/Receive/index.tsx b/src/app/screens/Receive/index.tsx index 463fdac36e..e878291aaa 100644 --- a/src/app/screens/Receive/index.tsx +++ b/src/app/screens/Receive/index.tsx @@ -18,6 +18,7 @@ import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import { useAccount } from "~/app/context/AccountContext"; import { useSettings } from "~/app/context/SettingsContext"; +import { isAlbyAccount } from "~/app/utils"; import api from "~/common/lib/api"; import msg from "~/common/lib/msg"; import { poll } from "~/common/utils/helpers"; @@ -51,6 +52,7 @@ function Receive() { const [paid, setPaid] = useState(false); const [pollingForPayment, setPollingForPayment] = useState(false); const mounted = useRef(false); + const isAlbyUser = isAlbyAccount(auth.account?.alias); useEffect(() => { mounted.current = true; @@ -237,44 +239,70 @@ function Receive() { {invoice ? ( {renderInvoice()} ) : ( -
-
- -
+
+ +
+ +
+
+ +
+ +
+ +
+
-
+
+
+ + {isAlbyUser && ( +
+ +
+
+ + {tCommon("or")} + +
+
- { + navigate("/onChainReceive"); + }} />
-
-
-
- -
- + + + )} + )} ); diff --git a/src/app/screens/connectors/ConnectLnd/index.tsx b/src/app/screens/connectors/ConnectLnd/index.tsx index dc7f045d66..1523aa32fd 100644 --- a/src/app/screens/connectors/ConnectLnd/index.tsx +++ b/src/app/screens/connectors/ConnectLnd/index.tsx @@ -22,6 +22,7 @@ export default function ConnectLnd() { const { t } = useTranslation("translation", { keyPrefix: "choose_connector.lnd", }); + const { t: tCommon } = useTranslation("common"); const [formData, setFormData] = useState(initialFormData); const [isDragging, setDragging] = useState(false); const hiddenFileInput = useRef(null); @@ -180,7 +181,7 @@ export default function ConnectLnd() { required /> -

{t("or")}

+

{tCommon("or")}

browse", "errors": { "connection_failed": "Connection failed. Are your LND credentials correct?" @@ -652,7 +651,14 @@ "payment": { "waiting": "waiting for payment...", "status": "Check payment status" - } + }, + "receive_via_bitcoin_address": "Receive via bitcoin address" + }, + "on_chain": { + "title": "Receive via bitcoin address", + "instructions1": "To receive bitcoin via a bitcoin address, login to your <0>Alby Account on getalby.com", + "instructions2": "You can find your bitcoin address on the <0>Receive page.", + "go": "Go to your Alby account →" }, "discover": { "title": "Explore the Lightning ⚡️ Ecosystem", @@ -818,6 +824,7 @@ "message": "Message", "help": "Help", "balance": "Balance", + "or": "or", "actions": { "back": "Back", "delete": "Delete",