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{Yq$>6*65WU=;%B`Hf_CXP-o-}HX6t$b74Pzys^|CzZ8P!@A;9SiA=lNR(Np4I*0VFst-Sl=z1BAZFxaY^l
zTxJf)s~}|`i6T6CLExcu(ucN3eApz1BZ_F4pf4BhBtOqDj=@Fk6B{X}vjuM5ig0#)
zTNM-=lIEEd*k?*X9}p|neEQZ2>rG?*TZXd=!4jt85i6GQXeev34oX@3S!*yA3j4vP
z_VIsV$H0VDS0T31q5X5lhV?l9v|9q5hE++HxD_R9;rFqojzUqKCp=gc
zME~_wEKY&AD+j#%aS_G$+Z?@iAO@n<@H0BpPu=)t(AOH5cQXh}TjmCEP3C2_Mukdg
z7Gzl&n4Xe
literal 0
HcmV?d00001
From da20da1ac568fc9f44f5bc944a80bc4fa27e15b7 Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Thu, 17 Mar 2022 19:18:35 -0600
Subject: [PATCH 02/16] feat: add instructions
---
.../screens/Onboard/ChooseConnector/index.tsx | 4 ++--
.../Onboard/ConnectRaspiBlitz/index.tsx | 19 ++++++++++++++++++-
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/app/screens/Onboard/ChooseConnector/index.tsx b/src/app/screens/Onboard/ChooseConnector/index.tsx
index 7396f481d1..07ebb0e9cc 100644
--- a/src/app/screens/Onboard/ChooseConnector/index.tsx
+++ b/src/app/screens/Onboard/ChooseConnector/index.tsx
@@ -53,7 +53,7 @@ export default function ChooseConnector({ title, description }: Props) {
];
return (
-
+
{title}
@@ -63,7 +63,7 @@ export default function ChooseConnector({ title, description }: Props) {
)}
-
+
{connectors.map(({ to, title, description, logo }) => (
You need your node URL and a macaroon with read and send permissions
- (e.g. admin.macaroon)
+ (e.g. admin.macaroon).
+
+
+ SSH into your RaspiBlitz.
+ Run the command sudo cat /mnt/hdd/tor/lndrest8080/hostname.
+
+ Copy your .onion address.
+
+ Add https:// at the beginning and :800 at the end.
+
+ Paste the URL in the input below.
@@ -144,6 +154,13 @@ export default function ConnectRaspiBlitz() {
{formData.url.match(/\.onion/i) &&
}
+
+ Select CONNECT.
+ Select EXPORT.
+ Select HEX.
+ Copy the adminMacaroon.
+ Paste the macaroon in the input below.
+
Date: Fri, 18 Mar 2022 10:45:00 -0600
Subject: [PATCH 03/16] refactor: remove upload macaroon, update port, update
textfield
---
.../Onboard/ConnectRaspiBlitz/index.tsx | 83 ++-----------------
1 file changed, 5 insertions(+), 78 deletions(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index 7f3492d3d7..f41e81ce7f 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -1,5 +1,4 @@
-import { SendIcon } from "@bitcoin-design/bitcoin-icons-react/filled";
-import { useRef, useState } from "react";
+import { useState } from "react";
import { useNavigate } from "react-router-dom";
import utils from "../../../../common/lib/utils";
import Button from "../../../components/Button";
@@ -14,8 +13,6 @@ const initialFormData = Object.freeze({
export default function ConnectRaspiBlitz() {
const navigate = useNavigate();
const [formData, setFormData] = useState(initialFormData);
- const [isDragging, setDragging] = useState(false);
- const hiddenFileInput = useRef(null);
const [loading, setLoading] = useState(false);
function handleChange(event: React.ChangeEvent) {
@@ -79,48 +76,6 @@ export default function ConnectRaspiBlitz() {
setLoading(false);
}
- function dropHandler(event: React.DragEvent) {
- event.preventDefault();
- if (
- event.dataTransfer.items &&
- event.dataTransfer.items[0].kind === "file"
- ) {
- const file = event.dataTransfer.items[0].getAsFile();
- if (file) {
- const extension = file.name.split(".").pop();
- if (extension === "macaroon") readFile(file);
- }
- }
- if (isDragging) setDragging(false);
- }
-
- function readFile(file: File) {
- const reader = new FileReader();
- reader.onload = function (evt) {
- if (evt.target?.result) {
- const macaroon = utils.bytesToHexString(
- new Uint8Array(evt.target.result as ArrayBuffer)
- );
- if (macaroon) {
- setFormData({
- ...formData,
- macaroon,
- });
- }
- }
- };
- reader.readAsArrayBuffer(file);
- }
-
- function dragOverHandler(event: React.DragEvent) {
- event.preventDefault();
- if (!isDragging) setDragging(true);
- }
-
- function dragLeaveHandler(event: React.DragEvent) {
- if (isDragging) setDragging(false);
- }
-
return (
From 6128c80cb8c168a6c288f5d9fc87022474e8972a Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Sun, 20 Mar 2022 18:18:23 -0600
Subject: [PATCH 04/16] feat: add https and port for user automatically
---
src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index f41e81ce7f..0308bdba57 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -18,7 +18,7 @@ export default function ConnectRaspiBlitz() {
function handleChange(event: React.ChangeEvent) {
setFormData({
...formData,
- [event.target.name]: event.target.value.trim(),
+ [event.target.name]: `https://${event.target.value.trim()}:8080`,
});
}
@@ -93,16 +93,14 @@ export default function ConnectRaspiBlitz() {
Copy your .onion address.
- Add https:// at the beginning and :8080 at the end.
-
Paste the URL in the input below.
Date: Mon, 21 Mar 2022 12:42:29 -0600
Subject: [PATCH 05/16] fix: update input pattern regex and message, add
conditional to onChange
---
.../Onboard/ConnectRaspiBlitz/index.tsx | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index 0308bdba57..e3c0c78ea3 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -16,10 +16,17 @@ export default function ConnectRaspiBlitz() {
const [loading, setLoading] = useState(false);
function handleChange(event: React.ChangeEvent) {
- setFormData({
- ...formData,
- [event.target.name]: `https://${event.target.value.trim()}:8080`,
- });
+ if (event.target.name === "url") {
+ setFormData({
+ ...formData,
+ [event.target.name]: `https://${event.target.value.trim()}:8080`,
+ });
+ } else {
+ setFormData({
+ ...formData,
+ [event.target.name]: event.target.value.trim(),
+ });
+ }
}
function getConnectorType() {
@@ -101,8 +108,8 @@ export default function ConnectRaspiBlitz() {
id="url"
label="REST API host"
placeholder="your-node-url"
- pattern="https://.+"
- title="https://your-node-url:8080"
+ pattern="^[A-Za-z0-9]*\.onion$"
+ title="your-node-url.onion"
onChange={handleChange}
required
/>
From 150a8f0a2db109b44d69ada1f65072d05f0b4e8d Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Mon, 21 Mar 2022 13:27:15 -0600
Subject: [PATCH 06/16] fix: change URL references to .onion address
---
src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index e3c0c78ea3..32c383421e 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -91,25 +91,23 @@ export default function ConnectRaspiBlitz() {
Connect to your RaspiBlitz node
- You need your node URL and a macaroon with read and send permissions
- (e.g. admin.macaroon).
+ You need your node onion address and a macaroon with read and send
+ permissions (e.g. admin.macaroon).
SSH into your RaspiBlitz.
Run the command sudo cat /mnt/hdd/tor/lndrest8080/hostname.
- Copy your .onion address.
-
- Paste the URL in the input below.
+ Copy and paste the .onion address in the input below.
From 035413990be8a0f6b7439182c1bd8867d87a094c Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Tue, 22 Mar 2022 22:07:43 -0600
Subject: [PATCH 07/16] refactor: make 2 functions for change and remove onion
validation
---
.../Onboard/ConnectRaspiBlitz/index.tsx | 30 +++++++++----------
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index 32c383421e..e09b3b343b 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -15,18 +15,18 @@ export default function ConnectRaspiBlitz() {
const [formData, setFormData] = useState(initialFormData);
const [loading, setLoading] = useState(false);
- function handleChange(event: React.ChangeEvent) {
- if (event.target.name === "url") {
- setFormData({
- ...formData,
- [event.target.name]: `https://${event.target.value.trim()}:8080`,
- });
- } else {
- setFormData({
- ...formData,
- [event.target.name]: event.target.value.trim(),
- });
- }
+ function handleUrl(event: React.ChangeEvent) {
+ setFormData({
+ ...formData,
+ [event.target.name]: `https://${event.target.value.trim()}:8080`,
+ });
+ }
+
+ function handleMacaroon(event: React.ChangeEvent) {
+ setFormData({
+ ...formData,
+ [event.target.name]: event.target.value.trim(),
+ });
}
function getConnectorType() {
@@ -106,9 +106,7 @@ export default function ConnectRaspiBlitz() {
id="url"
label="REST API host"
placeholder="your-node-onion-address"
- pattern="^[A-Za-z0-9]*\.onion$"
- title="your-node-address.onion"
- onChange={handleChange}
+ onChange={handleUrl}
required
/>
@@ -126,7 +124,7 @@ export default function ConnectRaspiBlitz() {
id="macaroon"
label="Macaroon (HEX format)"
value={formData.macaroon}
- onChange={handleChange}
+ onChange={handleMacaroon}
required
/>
From ff06931f81f2092389702348f867bf488dcb71c8 Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Wed, 23 Mar 2022 14:47:59 -0600
Subject: [PATCH 08/16] refactor: make port configurable
---
src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index e09b3b343b..972b0080e1 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -18,7 +18,7 @@ export default function ConnectRaspiBlitz() {
function handleUrl(event: React.ChangeEvent) {
setFormData({
...formData,
- [event.target.name]: `https://${event.target.value.trim()}:8080`,
+ [event.target.name]: `https://${event.target.value.trim()}`,
});
}
@@ -91,21 +91,26 @@ export default function ConnectRaspiBlitz() {
Connect to your RaspiBlitz node
- You need your node onion address and a macaroon with read and send
- permissions (e.g. admin.macaroon).
+ You need your node onion address, port, and a macaroon with read and
+ send permissions (e.g. admin.macaroon).
SSH into your RaspiBlitz.
Run the command sudo cat /mnt/hdd/tor/lndrest8080/hostname.
Copy and paste the .onion address in the input below.
+
+ Add your port after the onion address, the default port is{" "}
+ :8080.
+
+ You do not need to add https://
From d7f1aacef105489adb8c34b2abe648101086835f Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Fri, 1 Apr 2022 21:38:05 -0600
Subject: [PATCH 09/16] feat: check for http and add if not present
---
.../screens/Onboard/ConnectRaspiBlitz/index.tsx | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index 972b0080e1..b3101a47e5 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -16,10 +16,17 @@ export default function ConnectRaspiBlitz() {
const [loading, setLoading] = useState(false);
function handleUrl(event: React.ChangeEvent
) {
- setFormData({
- ...formData,
- [event.target.name]: `https://${event.target.value.trim()}`,
- });
+ if (event.target.value.substring(0, 4) === "http") {
+ setFormData({
+ ...formData,
+ [event.target.name]: event.target.value.trim(),
+ });
+ } else {
+ setFormData({
+ ...formData,
+ [event.target.name]: `https://${event.target.value.trim()}`,
+ });
+ }
}
function handleMacaroon(event: React.ChangeEvent) {
@@ -102,8 +109,6 @@ export default function ConnectRaspiBlitz() {
Add your port after the onion address, the default port is{" "}
:8080.
-
- You do not need to add https://
From 206d1f7d1a56e3906b1926ff26255d9ef0bf191a Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Tue, 5 Apr 2022 14:32:58 -0600
Subject: [PATCH 10/16] refactor: use bumi suggestion to dry handleUrl function
---
.../screens/Onboard/ConnectRaspiBlitz/index.tsx | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index b3101a47e5..f8f01715b9 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -16,17 +16,14 @@ export default function ConnectRaspiBlitz() {
const [loading, setLoading] = useState(false);
function handleUrl(event: React.ChangeEvent
) {
- if (event.target.value.substring(0, 4) === "http") {
- setFormData({
- ...formData,
- [event.target.name]: event.target.value.trim(),
- });
- } else {
- setFormData({
- ...formData,
- [event.target.name]: `https://${event.target.value.trim()}`,
- });
+ let url = event.target.value.trim();
+ if (event.target.value.substring(0, 4) !== "http") {
+ url = `https://${url}`;
}
+ setFormData({
+ ...formData,
+ [event.target.name]: url,
+ });
}
function handleMacaroon(event: React.ChangeEvent) {
From 3a819ad9f026924a6c053647a107d3600b374940 Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Tue, 5 Apr 2022 15:05:28 -0600
Subject: [PATCH 11/16] fix: add raspiblitz back in after merge
---
src/app/router/connectorRoutes.tsx | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/app/router/connectorRoutes.tsx b/src/app/router/connectorRoutes.tsx
index 45347486cc..95a31b4c1b 100644
--- a/src/app/router/connectorRoutes.tsx
+++ b/src/app/router/connectorRoutes.tsx
@@ -9,6 +9,7 @@ import umbrel from "/static/assets/icons/umbrel.png";
import start9 from "/static/assets/icons/start9.png";
import citadel from "/static/assets/icons/citadel.png";
import mynode from "/static/assets/icons/mynode.png";
+import raspiblitz from "/static/assets/icons/raspiblitz.png";
import ConnectLnd from "../screens/connectors/ConnectLnd";
import ConnectLndHub from "../screens/connectors/ConnectLndHub";
@@ -17,6 +18,7 @@ import ConnectGaloy, { galoyUrls } from "../screens/connectors/ConnectGaloy";
import ConnectEclair from "../screens/connectors/ConnectEclair";
import ConnectCitadel from "../screens/connectors/ConnectCitadel";
import NewWallet from "../screens/connectors/NewWallet";
+import ConnectRaspiBlitz from "../screens/Onboard/ConnectRaspiBlitz";
import ConnectUmbrel from "../screens/connectors/ConnectUmbrel";
import ConnectStart9 from "../screens/connectors/ConnectStart9";
import ConnectMyNode from "../screens/connectors/ConnectMyNode";
@@ -90,6 +92,13 @@ export default [
description: "Connect to your Embassy",
logo: start9,
},
+ {
+ path: "raspiblitz",
+ element: ,
+ title: "RaspiBlitz",
+ description: "Connect to your RaspiBlitz",
+ logo: raspiblitz,
+ },
{
path: galoyPaths.bitcoinBeach,
element: ,
From 304eb52286b15ca3ce5f3d638b59c1e542329997 Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Tue, 5 Apr 2022 15:05:51 -0600
Subject: [PATCH 12/16] fix: delete unused code
---
.../screens/Onboard/ChooseConnector/index.tsx | 121 ------------------
1 file changed, 121 deletions(-)
delete mode 100644 src/app/screens/Onboard/ChooseConnector/index.tsx
diff --git a/src/app/screens/Onboard/ChooseConnector/index.tsx b/src/app/screens/Onboard/ChooseConnector/index.tsx
deleted file mode 100644
index 94e8db8bdf..0000000000
--- a/src/app/screens/Onboard/ChooseConnector/index.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-import LinkButton from "../../../components/LinkButton";
-
-import lnbits from "/static/assets/icons/lnbits.png";
-import lndhub from "/static/assets/icons/lndhub.png";
-import lnd from "/static/assets/icons/lnd.png";
-import galoyBitcoinBeach from "/static/assets/icons/galoy_bitcoin_beach.jpg";
-import galoyBitcoinJungle from "/static/assets/icons/galoy_bitcoin_jungle.png";
-import eclair from "/static/assets/icons/eclair.jpg";
-import alby from "/static/assets/icons/alby.png";
-import raspiblitz from "/static/assets/icons/raspiblitz.png";
-import umbrel from "/static/assets/icons/umbrel.png";
-import start9 from "/static/assets/icons/start9.png";
-import citadel from "/static/assets/icons/citadel.png";
-import mynode from "/static/assets/icons/mynode.png";
-
-type Props = {
- title: string;
- description?: string;
-};
-
-export default function ChooseConnector({ title, description }: Props) {
- const connectors = [
- {
- to: "create-wallet",
- title: "Create a new wallet",
- description: "We create and manage a lightning wallet for you",
- logo: alby,
- },
- {
- to: "lnd",
- title: "LND",
- description: "Connect to your LND node",
- logo: lnd,
- },
- {
- to: "lnd-hub",
- title: "LNDHub (Bluewallet)",
- description: "Connect to your Bluewallet mobile wallet",
- logo: lndhub,
- },
- {
- to: "lnbits",
- title: "LNbits",
- description: "Connect to your LNbits account",
- logo: lnbits,
- },
- {
- to: "eclair",
- title: "Eclair",
- description: "Connect to your Eclair node",
- logo: eclair,
- },
- {
- to: "citadel",
- title: "Citadel",
- description: "Connect to your local Citadel",
- logo: citadel,
- },
- {
- to: "umbrel",
- title: "Umbrel",
- description: "Connect to your Umbrel",
- logo: umbrel,
- },
- {
- to: "mynode",
- title: "myNode",
- description: "Connect to your myNode",
- logo: mynode,
- },
- {
- to: "start9",
- title: "Start9",
- description: "Connect to your Embassy",
- logo: start9,
- },
- {
- to: "raspiblitz",
- title: "RaspiBlitz",
- description: "Connect to your RaspiBlitz",
- logo: raspiblitz,
- },
- { to: "galoy-bitcoin-beach",
- title: "Bitcoin Beach Wallet",
- description: "Create or connect to a Bitcoin Beach (Galoy) account",
- logo: galoyBitcoinBeach,
- },
- {
- to: "galoy-bitcoin-jungle",
- title: "Bitcoin Jungle Wallet",
- description: "Create or connect to a Bitcoin Jungle (Galoy) account",
- logo: galoyBitcoinJungle,
- },
- ];
-
- return (
-
-
-
-
{title}
- {description && (
-
- {description}
-
- )}
-
-
- {connectors.map(({ to, title, description, logo }) => (
-
- ))}
-
-
-
- );
-}
From e9a41f465c37b0ea3d63a1eb300ec2783a87a95e Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Tue, 5 Apr 2022 15:06:04 -0600
Subject: [PATCH 13/16] fix: filepath
---
src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
index f8f01715b9..f0bb2342b2 100644
--- a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { useNavigate } from "react-router-dom";
import utils from "../../../../common/lib/utils";
import Button from "../../../components/Button";
-import TextField from "../../../components/Form/TextField";
+import TextField from "../../../components/form/TextField";
import CompanionDownloadInfo from "../../../components/CompanionDownloadInfo";
const initialFormData = Object.freeze({
From 7361805b0391fcb91473b816c9c6e6bc9f1bd68b Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Tue, 5 Apr 2022 15:27:13 -0600
Subject: [PATCH 14/16] refactor: move to new folder structure
---
src/app/router/connectorRoutes.tsx | 2 +-
.../screens/{Onboard => connectors}/ConnectRaspiBlitz/index.tsx | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename src/app/screens/{Onboard => connectors}/ConnectRaspiBlitz/index.tsx (100%)
diff --git a/src/app/router/connectorRoutes.tsx b/src/app/router/connectorRoutes.tsx
index 95a31b4c1b..411f72f344 100644
--- a/src/app/router/connectorRoutes.tsx
+++ b/src/app/router/connectorRoutes.tsx
@@ -18,7 +18,7 @@ import ConnectGaloy, { galoyUrls } from "../screens/connectors/ConnectGaloy";
import ConnectEclair from "../screens/connectors/ConnectEclair";
import ConnectCitadel from "../screens/connectors/ConnectCitadel";
import NewWallet from "../screens/connectors/NewWallet";
-import ConnectRaspiBlitz from "../screens/Onboard/ConnectRaspiBlitz";
+import ConnectRaspiBlitz from "../screens/connectors/ConnectRaspiBlitz";
import ConnectUmbrel from "../screens/connectors/ConnectUmbrel";
import ConnectStart9 from "../screens/connectors/ConnectStart9";
import ConnectMyNode from "../screens/connectors/ConnectMyNode";
diff --git a/src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx b/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx
similarity index 100%
rename from src/app/screens/Onboard/ConnectRaspiBlitz/index.tsx
rename to src/app/screens/connectors/ConnectRaspiBlitz/index.tsx
From 0c901b165ca45cb38207112e6f6b92aa01a33d0d Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Wed, 13 Apr 2022 18:08:21 -0600
Subject: [PATCH 15/16] refactor: add url variable instead of event
---
src/app/screens/connectors/ConnectRaspiBlitz/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx b/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx
index f0bb2342b2..e31b7f8ced 100644
--- a/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx
@@ -17,7 +17,7 @@ export default function ConnectRaspiBlitz() {
function handleUrl(event: React.ChangeEvent) {
let url = event.target.value.trim();
- if (event.target.value.substring(0, 4) !== "http") {
+ if (url.substring(0, 4) !== "http") {
url = `https://${url}`;
}
setFormData({
From 9fb75287049364ecbbf189ea21131f3c201ba71a Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Wed, 13 Apr 2022 18:28:30 -0600
Subject: [PATCH 16/16] refactor: update to use new connectorform component
---
.../connectors/ConnectRaspiBlitz/index.tsx | 123 +++++++-----------
1 file changed, 50 insertions(+), 73 deletions(-)
diff --git a/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx b/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx
index e31b7f8ced..1a9e818fb3 100644
--- a/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx
+++ b/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx
@@ -1,9 +1,9 @@
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import utils from "../../../../common/lib/utils";
-import Button from "../../../components/Button";
import TextField from "../../../components/form/TextField";
import CompanionDownloadInfo from "../../../components/CompanionDownloadInfo";
+import ConnectorForm from "../../../components/ConnectorForm";
const initialFormData = Object.freeze({
url: "",
@@ -88,79 +88,56 @@ export default function ConnectRaspiBlitz() {
}
return (
-