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

Commit

Permalink
fix: replace savings balance card with receiving capacity card on wal…
Browse files Browse the repository at this point in the history
…let page
  • Loading branch information
rolznz committed Jun 28, 2024
1 parent 9cfb00f commit f38bc94
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions frontend/src/screens/wallet/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
ArrowDown,
ArrowDownIcon,
ArrowUp,
ArrowUpIcon,
Bitcoin,
CreditCard,
} from "lucide-react";
import { Link } from "react-router-dom";
Expand Down Expand Up @@ -89,9 +89,9 @@ function Wallet() {
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">
Savings Balance
Receiving Capacity
</CardTitle>
<Bitcoin className="h-4 w-4 text-muted-foreground" />
<ArrowDown className="h-4 w-4 text-muted-foreground" />
</CardHeader>
<CardContent>
{!balances && (
Expand All @@ -104,18 +104,10 @@ function Wallet() {
<div className="text-2xl font-bold">
{balances && (
<>
{new Intl.NumberFormat().format(balances.onchain.spendable)}{" "}
{new Intl.NumberFormat().format(
Math.floor(balances.lightning.totalReceivable / 1000)
)}{" "}
sats
{balances &&
balances.onchain.spendable !== balances.onchain.total && (
<p className="text-xs text-muted-foreground animate-pulse">
+
{new Intl.NumberFormat().format(
balances.onchain.total - balances.onchain.spendable
)}{" "}
sats incoming
</p>
)}
</>
)}
</div>
Expand Down

0 comments on commit f38bc94

Please sign in to comment.