From ea9e81734fdeff40b84f8eed38a8bcac06bc6cd1 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 25 Sep 2024 11:24:13 +0530 Subject: [PATCH] chore: use slashed zero and sensitive --- frontend/src/components/BalanceCard.tsx | 2 +- frontend/src/components/BudgetAmountSelect.tsx | 2 +- frontend/src/components/Permissions.tsx | 2 +- frontend/src/components/PodcastingInfo.tsx | 2 +- frontend/src/components/TransactionItem.tsx | 2 +- frontend/src/components/channels/ChannelsCards.tsx | 2 +- frontend/src/components/channels/ChannelsTable.tsx | 2 +- .../src/components/connections/AlbyConnectionCard.tsx | 2 +- frontend/src/components/connections/AppCard.tsx | 2 +- frontend/src/screens/apps/ShowApp.tsx | 2 +- frontend/src/screens/channels/Channels.tsx | 2 +- frontend/src/screens/channels/CurrentChannelOrder.tsx | 8 ++++---- .../src/screens/channels/IncreaseIncomingCapacity.tsx | 2 +- .../src/screens/channels/IncreaseOutgoingCapacity.tsx | 4 ++-- frontend/src/screens/channels/auto/AutoChannel.tsx | 2 +- frontend/src/screens/channels/first/FirstChannel.tsx | 4 ++-- frontend/src/screens/wallet/WithdrawOnchainFunds.tsx | 8 ++++---- frontend/src/screens/wallet/index.tsx | 2 +- frontend/src/screens/wallet/send/ConfirmPayment.tsx | 2 +- 19 files changed, 27 insertions(+), 27 deletions(-) diff --git a/frontend/src/components/BalanceCard.tsx b/frontend/src/components/BalanceCard.tsx index a762b0bb..04b510b1 100644 --- a/frontend/src/components/BalanceCard.tsx +++ b/frontend/src/components/BalanceCard.tsx @@ -33,7 +33,7 @@ function BalanceCard({ -
+
{new Intl.NumberFormat().format(Math.floor(balance / 1000))} sats
diff --git a/frontend/src/components/BudgetAmountSelect.tsx b/frontend/src/components/BudgetAmountSelect.tsx index 1e3d77df..f4d07752 100644 --- a/frontend/src/components/BudgetAmountSelect.tsx +++ b/frontend/src/components/BudgetAmountSelect.tsx @@ -26,7 +26,7 @@ function BudgetAmountSelect({ onChange(budgetOptions[budget]); }} className={cn( - "cursor-pointer rounded text-nowrap border-2 text-center p-4", + "cursor-pointer rounded text-nowrap border-2 text-center p-4 slashed-zero", !customBudget && value == budgetOptions[budget] ? "border-primary" : "border-muted" diff --git a/frontend/src/components/Permissions.tsx b/frontend/src/components/Permissions.tsx index b29f6ca1..761d365b 100644 --- a/frontend/src/components/Permissions.tsx +++ b/frontend/src/components/Permissions.tsx @@ -170,7 +170,7 @@ const Permissions: React.FC = ({ {" "} {permissions.budgetRenewal || "Never"}

-

+

Budget Amount: {" "} diff --git a/frontend/src/components/PodcastingInfo.tsx b/frontend/src/components/PodcastingInfo.tsx index 27944284..86f78f65 100644 --- a/frontend/src/components/PodcastingInfo.tsx +++ b/frontend/src/components/PodcastingInfo.tsx @@ -36,7 +36,7 @@ function PodcastingInfo({ boost }: { boost: Boostagram }) { {boost.valueMsatTotal && (

Total amount

-

+

{new Intl.NumberFormat().format( Math.floor(boost.valueMsatTotal / 1000) )}{" "} diff --git a/frontend/src/components/TransactionItem.tsx b/frontend/src/components/TransactionItem.tsx index 3669e4ec..1f30a680 100644 --- a/frontend/src/components/TransactionItem.tsx +++ b/frontend/src/components/TransactionItem.tsx @@ -175,7 +175,7 @@ function TransactionItem({ tx }: Props) { > {typeStateIcon}

-

+

{new Intl.NumberFormat().format(Math.floor(tx.amount / 1000))}{" "} {Math.floor(tx.amount / 1000) == 1 ? "sat" : "sats"}

diff --git a/frontend/src/components/channels/ChannelsCards.tsx b/frontend/src/components/channels/ChannelsCards.tsx index e968ed15..b1d6b75b 100644 --- a/frontend/src/components/channels/ChannelsCards.tsx +++ b/frontend/src/components/channels/ChannelsCards.tsx @@ -33,7 +33,7 @@ export function ChannelsCards({ channels, nodes }: ChannelsCardsProps) { return ( <>

Channels

-
+
{channels .sort((a, b) => a.localBalance + a.remoteBalance > b.localBalance + b.remoteBalance diff --git a/frontend/src/components/channels/ChannelsTable.tsx b/frontend/src/components/channels/ChannelsTable.tsx index 311ed55b..fc871429 100644 --- a/frontend/src/components/channels/ChannelsTable.tsx +++ b/frontend/src/components/channels/ChannelsTable.tsx @@ -32,7 +32,7 @@ export function ChannelsTable({ channels, nodes }: ChannelsTableProps) { } return ( -
+
diff --git a/frontend/src/components/connections/AlbyConnectionCard.tsx b/frontend/src/components/connections/AlbyConnectionCard.tsx index 45c4de3a..b0d6a170 100644 --- a/frontend/src/components/connections/AlbyConnectionCard.tsx +++ b/frontend/src/components/connections/AlbyConnectionCard.tsx @@ -151,7 +151,7 @@ function AlbyConnectionCard({ connection }: { connection?: App }) { {connection && ( -
+
- + diff --git a/frontend/src/screens/apps/ShowApp.tsx b/frontend/src/screens/apps/ShowApp.tsx index 96f3a108..03a7fdaf 100644 --- a/frontend/src/screens/apps/ShowApp.tsx +++ b/frontend/src/screens/apps/ShowApp.tsx @@ -222,7 +222,7 @@ function AppInternal({ app, refetchApp, capabilities }: AppInternalProps) { Info - +
diff --git a/frontend/src/screens/channels/Channels.tsx b/frontend/src/screens/channels/Channels.tsx index 8c381dbd..7e31769e 100644 --- a/frontend/src/screens/channels/Channels.tsx +++ b/frontend/src/screens/channels/Channels.tsx @@ -248,7 +248,7 @@ export default function Channels() {
diff --git a/frontend/src/screens/channels/CurrentChannelOrder.tsx b/frontend/src/screens/channels/CurrentChannelOrder.tsx index 2087e033..e6199eaf 100644 --- a/frontend/src/screens/channels/CurrentChannelOrder.tsx +++ b/frontend/src/screens/channels/CurrentChannelOrder.tsx @@ -301,9 +301,9 @@ function PayBitcoinChannelOrderTopup({ order }: { order: NewChannelOrder }) {
-

+

You currently have{" "} - + {new Intl.NumberFormat().format(balances.onchain.total)} {" "} sats. We recommend depositing{" "} @@ -382,7 +382,7 @@ function PayBitcoinChannelOrderTopup({ order }: { order: NewChannelOrder }) { {unspentAmount > 0 && ( - + {new Intl.NumberFormat().format(unspentAmount)} sats deposited )} @@ -687,7 +687,7 @@ function PayLightningChannelOrder({ order }: { order: NewChannelOrder }) { {lspOrderResponse && ( <>

-
+
{lspOrderResponse.outgoingLiquidity > 0 && ( diff --git a/frontend/src/screens/channels/IncreaseIncomingCapacity.tsx b/frontend/src/screens/channels/IncreaseIncomingCapacity.tsx index cf424259..51c08923 100644 --- a/frontend/src/screens/channels/IncreaseIncomingCapacity.tsx +++ b/frontend/src/screens/channels/IncreaseIncomingCapacity.tsx @@ -299,7 +299,7 @@ function NewChannelInternal({ )}
{peer.name} - + Min.{" "} {new Intl.NumberFormat().format( peer.minimumChannelSize diff --git a/frontend/src/screens/channels/IncreaseOutgoingCapacity.tsx b/frontend/src/screens/channels/IncreaseOutgoingCapacity.tsx index 6baaca13..fe17af92 100644 --- a/frontend/src/screens/channels/IncreaseOutgoingCapacity.tsx +++ b/frontend/src/screens/channels/IncreaseOutgoingCapacity.tsx @@ -269,7 +269,7 @@ function NewChannelInternal({ network }: { network: Network }) { setAmount(e.target.value.trim()); }} /> -
+
Current savings balance:{" "} {new Intl.NumberFormat().format(balances.onchain.spendable)} sats
@@ -333,7 +333,7 @@ function NewChannelInternal({ network }: { network: Network }) {
{peer.name} {peer.minimumChannelSize > 0 && ( - + Min.{" "} {new Intl.NumberFormat().format( peer.minimumChannelSize diff --git a/frontend/src/screens/channels/auto/AutoChannel.tsx b/frontend/src/screens/channels/auto/AutoChannel.tsx index 82ae82a8..485f2d31 100644 --- a/frontend/src/screens/channels/auto/AutoChannel.tsx +++ b/frontend/src/screens/channels/auto/AutoChannel.tsx @@ -105,7 +105,7 @@ export function AutoChannel() { {invoice && channelSize && (
-

+

Please pay the lightning invoice below which will cover the costs of opening your channel. You will receive a channel with{" "} {new Intl.NumberFormat().format(channelSize)} sats of incoming diff --git a/frontend/src/screens/channels/first/FirstChannel.tsx b/frontend/src/screens/channels/first/FirstChannel.tsx index 6afb710e..2dda80c7 100644 --- a/frontend/src/screens/channels/first/FirstChannel.tsx +++ b/frontend/src/screens/channels/first/FirstChannel.tsx @@ -104,7 +104,7 @@ export function FirstChannel() { {invoice && channelSize && (

-

+

Please pay the lightning invoice below which will cover the costs of opening your first channel. You will receive a channel with{" "} {new Intl.NumberFormat().format(channelSize)} sats of incoming @@ -143,7 +143,7 @@ export function FirstChannel() { <>

Your Alby hosted balance currently holds{" "} - + {new Intl.NumberFormat().format(albyBalance?.sats)} sats . diff --git a/frontend/src/screens/wallet/WithdrawOnchainFunds.tsx b/frontend/src/screens/wallet/WithdrawOnchainFunds.tsx index ecb70999..5fd198a5 100644 --- a/frontend/src/screens/wallet/WithdrawOnchainFunds.tsx +++ b/frontend/src/screens/wallet/WithdrawOnchainFunds.tsx @@ -154,7 +154,7 @@ export default function WithdrawOnchainFunds() {

-

+

Current onchain balance:{" "} {new Intl.NumberFormat().format(balances.onchain.spendable)}{" "} sats @@ -187,14 +187,14 @@ export default function WithdrawOnchainFunds() { Your entire wallet balance {balances.onchain.reserved > 0 && ( - <> + {" "} including reserves ( {new Intl.NumberFormat().format( balances.onchain.reserved )}{" "} sats) - + )}{" "} will be sent minus onchain transaction fees. The exact amount cannot be determined until the payment is made. @@ -264,7 +264,7 @@ export default function WithdrawOnchainFunds() {

Amount:{" "} - + {sendAll ? ( "entire savings balance" ) : ( diff --git a/frontend/src/screens/wallet/index.tsx b/frontend/src/screens/wallet/index.tsx index 46d4b83d..1e8463ab 100644 --- a/frontend/src/screens/wallet/index.tsx +++ b/frontend/src/screens/wallet/index.tsx @@ -47,7 +47,7 @@ function Wallet() {

You still have{" "} - + {new Intl.NumberFormat().format(albyBalance.sats)} {" "} sats in your Alby shared wallet diff --git a/frontend/src/screens/wallet/send/ConfirmPayment.tsx b/frontend/src/screens/wallet/send/ConfirmPayment.tsx index b67fbdf9..f924758b 100644 --- a/frontend/src/screens/wallet/send/ConfirmPayment.tsx +++ b/frontend/src/screens/wallet/send/ConfirmPayment.tsx @@ -70,7 +70,7 @@ export default function ConfirmPayment() {

Payment Details

-

+

{new Intl.NumberFormat().format(invoice.satoshi)} sats