feat(ui): encode ShockWallet deep link URL in nprofile QR

QR now encodes wallet.aiolabs.dev/sources/add?nprofile=... so scanning
opens ShockWallet with the ATM's Lightning.Pub pre-filled, handling
both new and existing users.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Patrick Mulligan 2026-04-01 13:50:43 -04:00
commit 28f0fd79a7

View file

@ -31,6 +31,12 @@ const lpNprofile = computed(() => {
return nip19.nprofileEncode({ pubkey, relays })
})
// Deep link URL: opens ShockWallet with this ATM's Lightning.Pub pre-filled
const shockwalletDeepLink = computed(() => {
if (!lpNprofile.value) return ''
return `https://wallet.aiolabs.dev/sources/add?nprofile=${encodeURIComponent(lpNprofile.value)}`
})
interface SupportPage {
id: string
title: string
@ -324,13 +330,13 @@ function goBack() {
</CardContent>
</Card>
<!-- Lightning.Pub nprofile QR -->
<!-- Lightning.Pub nprofile QR (deep link to ShockWallet) -->
<Card v-else-if="seg.type === 'lp-nprofile'" class="my-6 mx-auto max-w-xs">
<CardContent class="flex flex-col items-center gap-3 p-6">
<template v-if="lpNprofile">
<template v-if="shockwalletDeepLink">
<div class="rounded-xl bg-white p-3">
<QrcodeVue
:value="lpNprofile"
:value="shockwalletDeepLink"
:size="180"
level="L"
render-as="svg"
@ -338,8 +344,8 @@ function goBack() {
foreground="#000000"
/>
</div>
<span class="text-xs text-muted-foreground font-mono text-center break-all px-2">
{{ lpNprofile.slice(0, 32) }}...
<span class="text-xs text-muted-foreground text-center px-2">
Scan to open ShockWallet
</span>
</template>
<template v-else>