Skip to content

Commit f9ce016

Browse files
committed
feat: add copy button for expected amount in Boltz swap
1 parent 944c41c commit f9ce016

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/components/web-wallet/BoltzSwap.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,15 @@ export function BoltzSwap({ walletId, btcAddress, btcBalance, lnBalance }: Props
313313
<p className="text-xs text-gray-400">Send BTC to this address:</p>
314314
<p className="text-sm text-white font-mono break-all">{swapData.address}</p>
315315
{swapData.expectedAmount && (
316-
<p className="text-xs text-gray-400">
317-
Expected: {(swapData.expectedAmount / 1e8).toFixed(8)} BTC ({swapData.expectedAmount.toLocaleString()} sats)
318-
</p>
316+
<div className="flex items-center justify-between text-xs text-gray-400">
317+
<span>Expected: {(swapData.expectedAmount / 1e8).toFixed(8)} BTC ({swapData.expectedAmount.toLocaleString()} sats)</span>
318+
<button
319+
onClick={() => copy((swapData.expectedAmount / 1e8).toFixed(8), 'amount')}
320+
className="ml-2 text-purple-300 hover:text-purple-200 transition-colors"
321+
>
322+
{copied === 'amount' ? '✓' : 'Copy'}
323+
</button>
324+
</div>
319325
)}
320326
<button
321327
onClick={() => copy(swapData.address, 'address')}

0 commit comments

Comments
 (0)