Skip to content

Commit 7acb4eb

Browse files
committed
fix: move address copy button inline next to address
1 parent f9ce016 commit 7acb4eb

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/components/web-wallet/BoltzSwap.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,15 @@ export function BoltzSwap({ walletId, btcAddress, btcBalance, lnBalance }: Props
311311
{direction === 'in' && swapData?.address && swapState === 'polling' && (
312312
<div className="rounded-xl bg-black/20 p-4 space-y-2">
313313
<p className="text-xs text-gray-400">Send BTC to this address:</p>
314-
<p className="text-sm text-white font-mono break-all">{swapData.address}</p>
314+
<div className="flex items-start justify-between gap-2">
315+
<p className="text-sm text-white font-mono break-all">{swapData.address}</p>
316+
<button
317+
onClick={() => copy(swapData.address, 'address')}
318+
className="shrink-0 text-xs text-purple-300 hover:text-purple-200 transition-colors"
319+
>
320+
{copied === 'address' ? '✓' : 'Copy'}
321+
</button>
322+
</div>
315323
{swapData.expectedAmount && (
316324
<div className="flex items-center justify-between text-xs text-gray-400">
317325
<span>Expected: {(swapData.expectedAmount / 1e8).toFixed(8)} BTC ({swapData.expectedAmount.toLocaleString()} sats)</span>
@@ -323,12 +331,7 @@ export function BoltzSwap({ walletId, btcAddress, btcBalance, lnBalance }: Props
323331
</button>
324332
</div>
325333
)}
326-
<button
327-
onClick={() => copy(swapData.address, 'address')}
328-
className="w-full rounded-lg bg-purple-600/30 py-2 text-xs text-purple-300 hover:bg-purple-600/50 transition-colors"
329-
>
330-
{copied === 'address' ? '✓ Copied!' : 'Copy Address'}
331-
</button>
334+
332335
{swapData.bip21 && (
333336
<button
334337
onClick={() => copy(swapData.bip21, 'bip21')}

0 commit comments

Comments
 (0)