Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
fix: hide whole receive card on wallet page if ln client does not hav…
Browse files Browse the repository at this point in the history
…e channel management
  • Loading branch information
rolznz committed Jul 1, 2024
1 parent 31d81fd commit 2020699
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions frontend/src/screens/wallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,40 +96,40 @@ function Wallet() {
</CardFooter>
)}
</Card>
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">
Receiving Capacity
</CardTitle>
<ArrowDown className="h-4 w-4 text-muted-foreground" />
</CardHeader>
<CardContent>
{!balances && (
<div>
<div className="animate-pulse d-inline ">
<div className="h-2.5 bg-primary rounded-full w-12 my-2"></div>
{hasChannelManagement && (
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">
Receiving Capacity
</CardTitle>
<ArrowDown className="h-4 w-4 text-muted-foreground" />
</CardHeader>
<CardContent>
{!balances && (
<div>
<div className="animate-pulse d-inline ">
<div className="h-2.5 bg-primary rounded-full w-12 my-2"></div>
</div>
</div>
</div>
)}
<div className="text-2xl font-bold">
{balances && (
<>
{new Intl.NumberFormat().format(
Math.floor(balances.lightning.totalReceivable / 1000)
)}{" "}
sats
</>
)}
</div>
</CardContent>
{hasChannelManagement && (
<div className="text-2xl font-bold">
{balances && (
<>
{new Intl.NumberFormat().format(
Math.floor(balances.lightning.totalReceivable / 1000)
)}{" "}
sats
</>
)}
</div>
</CardContent>
<CardFooter className="flex justify-end">
<Link to="/channels/incoming">
<Button variant="outline">Increase</Button>
</Link>
</CardFooter>
)}
</Card>
</Card>
)}
</div>

<TransactionsList />
Expand Down

0 comments on commit 2020699

Please sign in to comment.