mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 08:23:35 +00:00
hide ln address on cashu and change currency colors
This commit is contained in:
1 parent
ad6e0c9f8d
commit
3b8c5da1fd
2 files changed
+13
-9
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Plus, X, Check, ChevronDown, Wallet } from 'lucide-react';
|
||||
import { Plus, X, Check, ChevronDown, Landmark } from 'lucide-react';
|
||||
import { useState, useEffect } from 'react';
|
||||
import { exchangeRateService } from '@/lib/exchangeRateService';
|
||||
import {
|
||||
@@ -183,7 +183,7 @@ export function MintSelector({
|
||||
className="flex items-center justify-center px-2 py-1.5 hover:bg-muted rounded-md transition-colors h-[40px] w-[42px] flex-shrink-0"
|
||||
title="View token breakdown"
|
||||
>
|
||||
<Wallet className="h-4 w-4" />
|
||||
<Landmark className="h-4 w-4" />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -54,8 +54,12 @@ const formatBalance = (balance: number, showSats: boolean, btcUsdRate?: number |
|
||||
return balance.toLocaleString();
|
||||
};
|
||||
|
||||
const getBalanceSymbol = (showSats: boolean): string => {
|
||||
return showSats ? '₿' : '$';
|
||||
const getBalanceSymbol = (showSats: boolean): JSX.Element => {
|
||||
return showSats ? (
|
||||
<span className="text-orange-500/70">₿</span>
|
||||
) : (
|
||||
<span className="text-green-500/70">$</span>
|
||||
);
|
||||
};
|
||||
|
||||
const getToggleTitle = (showSats: boolean): string => {
|
||||
@@ -82,9 +86,9 @@ const getModeDescription = (mode: string): string => {
|
||||
|
||||
const getButtonTitle = (mode: string): string => {
|
||||
switch (mode) {
|
||||
case 'tokens': return 'Switch to Lightning';
|
||||
case 'lightning': return 'Switch to Bitcoin';
|
||||
case 'bitcoin': return 'Switch to Cashu Tokens';
|
||||
case 'tokens': return 'Switch to On-Chain';
|
||||
case 'lightning': return 'Switch to Cashu';
|
||||
case 'bitcoin': return 'Switch to Lightning';
|
||||
default: return 'Switch Mode';
|
||||
}
|
||||
};
|
||||
@@ -177,7 +181,7 @@ export function WalletHeader({
|
||||
className="text-6xl font-bold tabular-nums hover:opacity-80 transition-opacity cursor-pointer"
|
||||
title={getToggleTitle(showSats)}
|
||||
>
|
||||
<span className="text-muted-foreground italic">
|
||||
<span className="italic">
|
||||
{getBalanceSymbol(showSats)}
|
||||
</span>
|
||||
{formatBalance(totalBalance, showSats, btcUsdRate)}
|
||||
@@ -189,7 +193,7 @@ export function WalletHeader({
|
||||
<div className="w-full max-w-[400px] mx-auto">
|
||||
<div className="grid grid-cols-1 gap-3">
|
||||
{/* Lightning Address Row */}
|
||||
{userPubkey && mode !== 'bitcoin' && (
|
||||
{userPubkey && mode === 'lightning' && (
|
||||
<div className="flex gap-2 items-center min-w-[300px]">
|
||||
<button
|
||||
onClick={async () => {
|
||||
|
||||
Reference in new issue
Block a user