Skip to content

Commit

Permalink
Merge pull request #176 from getAlby/fix/handle-millisats-invoices
Browse files Browse the repository at this point in the history
fix: handle millisat invoices
  • Loading branch information
im-adithya authored Oct 30, 2024
2 parents 5244ecb + 204dc64 commit 4780898
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pages/send/ConfirmPayment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ export function ConfirmPayment() {
<View className="flex flex-col gap-2">
<View className="flex flex-row items-center justify-center gap-2">
<Text className="text-5xl font-bold2 text-foreground">
{new Intl.NumberFormat().format(decodedInvoice.satoshi)}
{new Intl.NumberFormat().format(
Math.ceil(decodedInvoice.satoshi),
)}
</Text>
<Text className="text-3xl font-bold2 text-muted-foreground">
sats
Expand Down
2 changes: 1 addition & 1 deletion pages/send/PaymentSuccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function PaymentSuccess() {
<View className="flex flex-col items-center gap-2">
<View className="flex flex-row items-end justify-center">
<Text className="text-3xl text-foreground font-semibold2">
{new Intl.NumberFormat().format(+amount)}{" "}
{new Intl.NumberFormat().format(Math.ceil(+amount))}{" "}
</Text>
<Text className="text-2xl text-muted-foreground font-semibold2">
sats
Expand Down

0 comments on commit 4780898

Please sign in to comment.