Revert "Add QR codes for Monero address and subaddresses"
This reverts commit 95aebfe690.
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
<script lang="ts">
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
let { text, size = 128 }: { text: string; size?: number } = $props()
|
||||
|
||||
let dataUrl = $state('')
|
||||
|
||||
$effect(() => {
|
||||
if (!text) return
|
||||
QRCode.toDataURL(text, {
|
||||
width: size,
|
||||
margin: 1,
|
||||
color: { dark: '#000', light: '#fff' },
|
||||
}).then((url) => {
|
||||
dataUrl = url
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if dataUrl}
|
||||
<img src={dataUrl} alt="QR code" {width} {height} class="rounded-md" />
|
||||
{/if}
|
||||
@@ -15,7 +15,6 @@
|
||||
import Fingerprint from '@lucide/svelte/icons/fingerprint'
|
||||
import SettingsIcon from '@lucide/svelte/icons/settings'
|
||||
import Loader from '$lib/components/loader.svelte'
|
||||
import QrCode from '$lib/components/qr.svelte'
|
||||
import { navigate } from 'sv-router/generated'
|
||||
|
||||
const w = moneroWallet
|
||||
@@ -195,13 +194,8 @@
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="mb-4 space-y-1">
|
||||
<div class="flex items-start gap-3">
|
||||
<QrCode text={w.address} size={128} />
|
||||
<div class="min-w-0 flex-1 space-y-1">
|
||||
<p class="font-medium text-xs">Address</p>
|
||||
<p class="font-mono text-xs break-all">{w.address}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-2 font-medium text-xs">Balance</p>
|
||||
<p class="font-mono text-lg">{w.balance} XMR</p>
|
||||
{#if w.unlockedAtomic !== w.balAtomic}
|
||||
@@ -307,16 +301,11 @@
|
||||
<p class="text-xs text-muted-foreground mb-1">Subaddresses</p>
|
||||
{#each account.subaddresses as sub}
|
||||
<div class="rounded-sm bg-background px-2 py-1.5 text-xs">
|
||||
<div class="flex items-start gap-2">
|
||||
<QrCode text={sub.address} size={64} />
|
||||
<div class="min-w-0 flex-1">
|
||||
<div class="flex items-center justify-between">
|
||||
<p class="font-medium">#{sub.index}{sub.label ? ` - ${sub.label}` : ''}</p>
|
||||
<p class="text-muted-foreground">{atomicToXmr(sub.balance)} XMR</p>
|
||||
</div>
|
||||
<p class="font-mono text-muted-foreground/50 truncate mt-0.5">{sub.address}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="font-mono text-muted-foreground/50 truncate">{sub.address}</p>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user