Skip to content

Commit 3f63251

Browse files
authored
fix: convert spaces to underscores in subwallet lightning address suggestion (#2086)
1 parent 3fcb2ba commit 3f63251

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/screens/subwallets/SubwalletCreated.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ export function SubwalletCreated() {
6666
const { data: app } = useApp(createAppResponse?.id, true);
6767
const [intendedLightningAddress, setIntendedLightningAddress] =
6868
React.useState(
69-
createAppResponse?.name.toLowerCase().replace(/[^a-z0-9]/g, "") || ""
69+
createAppResponse?.name
70+
.toLowerCase()
71+
.trim()
72+
.replace(/\s+/g, "_")
73+
.replace(/[^a-z0-9_]/g, "") || ""
7074
);
7175

7276
const { data: albyMe } = useAlbyMe();

0 commit comments

Comments
 (0)