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:
parent
0ee93aff74
commit
28f0fd79a7
1 changed files with 11 additions and 5 deletions
|
|
@ -31,6 +31,12 @@ const lpNprofile = computed(() => {
|
||||||
return nip19.nprofileEncode({ pubkey, relays })
|
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 {
|
interface SupportPage {
|
||||||
id: string
|
id: string
|
||||||
title: string
|
title: string
|
||||||
|
|
@ -324,13 +330,13 @@ function goBack() {
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</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">
|
<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">
|
<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">
|
<div class="rounded-xl bg-white p-3">
|
||||||
<QrcodeVue
|
<QrcodeVue
|
||||||
:value="lpNprofile"
|
:value="shockwalletDeepLink"
|
||||||
:size="180"
|
:size="180"
|
||||||
level="L"
|
level="L"
|
||||||
render-as="svg"
|
render-as="svg"
|
||||||
|
|
@ -338,8 +344,8 @@ function goBack() {
|
||||||
foreground="#000000"
|
foreground="#000000"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span class="text-xs text-muted-foreground font-mono text-center break-all px-2">
|
<span class="text-xs text-muted-foreground text-center px-2">
|
||||||
{{ lpNprofile.slice(0, 32) }}...
|
Scan to open ShockWallet
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue