Skip to content

Commit

Permalink
chore: do not round connection balance (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya authored Sep 17, 2024
1 parent 611f84c commit fbc2a1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export function AppCardConnectionInfo({
<div className="flex flex-col items-end justify-end">
<p>Balance</p>
<p className="text-xl font-medium">
{formatAmount(connection.balance)} sats
{new Intl.NumberFormat().format(
Math.floor(connection.balance / 1000)
)}{" "}
sats
</p>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/screens/apps/ShowApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import { Table, TableBody, TableCell, TableRow } from "src/components/ui/table";
import { useToast } from "src/components/ui/use-toast";
import { useApps } from "src/hooks/useApps";
import { useCapabilities } from "src/hooks/useCapabilities";
import { formatAmount } from "src/lib/utils";

function ShowApp() {
const { pubkey } = useParams() as { pubkey: string };
Expand Down Expand Up @@ -242,7 +241,10 @@ function AppInternal({ app, refetchApp, capabilities }: AppInternalProps) {
<TableRow>
<TableCell className="font-medium">Balance</TableCell>
<TableCell className="text-muted-foreground break-all">
{formatAmount(app.balance)} sats
{new Intl.NumberFormat().format(
Math.floor(app.balance / 1000)
)}{" "}
sats
</TableCell>
</TableRow>
)}
Expand Down

0 comments on commit fbc2a1b

Please sign in to comment.