import { AlertCircleIcon, AlertTriangleIcon, CopyIcon, ExternalLinkIcon, MonitorIcon, RadioIcon, SmartphoneIcon, TriangleAlertIcon, UserIcon, ZapIcon, } from "lucide-react"; import React from "react"; import { useLocation, useNavigate } from "react-router"; import AppHeader from "src/components/AppHeader"; import ExternalLink from "src/components/ExternalLink"; import { FormattedBitcoinAmount } from "src/components/FormattedBitcoinAmount"; import { AppleIcon } from "src/components/icons/Apple"; import { PlayStoreIcon } from "src/components/icons/PlayStore"; import { ZapStoreIcon } from "src/components/icons/ZapStore"; import { IsolatedAppTopupDialog } from "src/components/IsolatedAppTopupDialog"; import QRCode from "src/components/QRCode"; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "src/components/ui/accordion"; import { Alert, AlertDescription, AlertTitle } from "src/components/ui/alert"; import { Button } from "src/components/ui/button"; import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "src/components/ui/card"; import { ExternalLinkButton } from "src/components/ui/custom/external-link-button"; import { InputWithAdornment } from "src/components/ui/custom/input-with-adornment"; import { LinkButton } from "src/components/ui/custom/link-button"; import { LoadingButton } from "src/components/ui/custom/loading-button"; import { Input } from "src/components/ui/input"; import { Label } from "src/components/ui/label"; import { Popover, PopoverContent, PopoverTrigger, } from "src/components/ui/popover"; import { Textarea } from "src/components/ui/textarea"; import { UpgradeDialog } from "src/components/UpgradeDialog"; import { useAlbyMe } from "src/hooks/useAlbyMe"; import { useApp } from "src/hooks/useApp"; import { useCreateLightningAddress } from "src/hooks/useCreateLightningAddress"; import { useNodeConnectionInfo } from "src/hooks/useNodeConnectionInfo"; import { copyToClipboard } from "src/lib/clipboard"; import { ConnectAppCard } from "src/screens/apps/ConnectAppCard"; import { CreateAppResponse } from "src/types"; export function SubwalletCreated() { const { data: nodeConnectionInfo } = useNodeConnectionInfo(); const { state } = useLocation(); const navigate = useNavigate(); const createAppResponse = state as CreateAppResponse | undefined; const { data: app } = useApp(createAppResponse?.id, true); const [intendedLightningAddress, setIntendedLightningAddress] = React.useState( createAppResponse?.name .toLowerCase() .trim() .replace(/\s+/g, "_") .replace(/[^a-z0-9_]/g, "") || "" ); const { data: albyMe } = useAlbyMe(); const { createLightningAddress, creatingLightningAddress } = useCreateLightningAddress(createAppResponse?.id); const [step, setStep] = React.useState(1); if (!createAppResponse?.pairingUri) { navigate("/"); return null; } const name = createAppResponse.name; let connectionSecret = createAppResponse.pairingUri; if (app?.metadata?.lud16) { connectionSecret += `&lud16=${app.metadata.lud16}`; } const albyAccountUrl = `https://getalby.com/nwc/new#${connectionSecret}`; const valueTag = ` `; return (
{step === 1 && app && (
Configure this sub-wallet by creating a lightning address and topping it up. That way it's ready to use as soon as it's connected.
{!app.metadata?.lud16 && ( Lightning address Create a lightning address for this sub-wallet setIntendedLightningAddress(e.target.value) } required autoComplete="off" endAdornment={ @getalby.com } /> {!albyMe?.subscription.plan_code ? ( ) : ( createLightningAddress(intendedLightningAddress) } size="sm" variant="secondary" > Create Lightning Address )} )} {app.metadata?.lud16 && ( Lightning address Your lightning address for this sub-account

{app.metadata.lud16}

)} {name} Balance:{" "}
)} {step === 2 && (
Select which apps to connect to this sub-wallet — whether for yourself or someone you're inviting. Connect to as many services as you want:
Important For your security, these connection details are only visible now and{" "} cannot be retrieved later . If needed, you can store them in a password manager for future reference.
Connect Your App
{app && (
)}
Alby Go
  • Download Alby Go from the app store
    Open Open
    Install Zapstore on your Android device and search for{" "} Alby Go
    Open
  • Open Alby Go and scan this QR code
{app && ( )}
Alby Account
  • If the recipient doesn't have an Alby Account yet, ask them to create an Alby Account on getalby.com or send them an{" "} invite
  • Send your recipient this connection link after they've created an Alby account. The link will automatically connect the wallet to their account — no extra steps needed.
Use separate browsers or profiles when managing multiple Alby accounts Opening a connection URL while logged into a different Alby account will override your currently connected wallet.
Alby Browser Extension
  • Install Alby Browser Extension from{" "} Chrome Web Store {" "} or{" "} Firefox Add-ons
  • In the extension, choose{" "} Bring Your Own Wallet {" "} while connecting a wallet
  • Choose{" "} Nostr Wallet Connect {" "} option
  • Copy & paste the connection secret below to connect the sub-wallet to the extension.
Podcasting 2.0

To allow receiving podcasting 2.0 payments to the sub-wallet, make sure to share the podcast:value tag that needs to be added to recipient's RSS feed: