From 9828f320b2bad43e5f40b550778d15cf9fa61013 Mon Sep 17 00:00:00 2001 From: benthecarman Date: Mon, 4 Sep 2023 16:48:04 -0500 Subject: [PATCH] Add channel reserve to lightning channels screen --- src/i18n/en/translations.ts | 3 +++ src/routes/settings/Channels.tsx | 25 ++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/i18n/en/translations.ts b/src/i18n/en/translations.ts index 9112fd7..4c5f445 100644 --- a/src/i18n/en/translations.ts +++ b/src/i18n/en/translations.ts @@ -245,11 +245,14 @@ export default { title: "Lightning Channels", outbound: "Outbound", inbound: "Inbound", + reserve: "Reserve", have_channels: "You have", have_channels_one: "lightning channel.", have_channels_many: "lightning channels.", inbound_outbound_tip: "Outbound is the amount of money you can spend on lightning. Inbound is the amount you can receive without incurring a lightning service fee.", + reserve_tip: + "About 1% of your channel balance is reserved on lightning for fees.", no_channels: "It looks like you don't have any channels yet. To get started, receive some sats over lightning, or swap some on-chain funds into a channel. Get your hands dirty!" }, diff --git a/src/routes/settings/Channels.tsx b/src/routes/settings/Channels.tsx index 22fea29..de4fdf7 100644 --- a/src/routes/settings/Channels.tsx +++ b/src/routes/settings/Channels.tsx @@ -17,7 +17,11 @@ import { import { useI18n } from "~/i18n/context"; import { useMegaStore } from "~/state/megaStore"; -function BalanceBar(props: { inbound: number; outbound: number }) { +function BalanceBar(props: { + inbound: number; + reserve: number; + outbound: number; +}) { const i18n = useI18n(); return ( @@ -25,6 +29,7 @@ function BalanceBar(props: { inbound: number; outbound: number }) { {i18n.t("settings.channels.outbound")} + {i18n.t("settings.channels.reserve")} {i18n.t("settings.channels.inbound")}
@@ -36,6 +41,14 @@ function BalanceBar(props: { inbound: number; outbound: number }) { >
+
+ +
{" "} {i18n.t("settings.channels.inbound_outbound_tip")} + + {i18n.t("settings.channels.reserve_tip")} +