From ece52601b8a3ae8da8d40cce0507d1c0bf7dabac Mon Sep 17 00:00:00 2001 From: benalleng Date: Sat, 3 Feb 2024 17:23:05 -0500 Subject: [PATCH] feat: add esats for federations --- e2e/fedimint.spec.ts | 2 +- src/components/Amount.tsx | 9 +++++++-- src/components/BalanceBox.tsx | 1 + src/i18n/en/translations.ts | 2 ++ src/routes/settings/ManageFederations.tsx | 1 + 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/e2e/fedimint.spec.ts b/e2e/fedimint.spec.ts index 575054fa..6ba9d244 100644 --- a/e2e/fedimint.spec.ts +++ b/e2e/fedimint.spec.ts @@ -118,7 +118,7 @@ test("fedmint join, receive, send", async ({ page }) => { await expect( page .locator("div") - .filter({ hasText: /^100 SATS$/ }) + .filter({ hasText: /^100 eSATS$/ }) .nth(1) ).toBeVisible(); diff --git a/src/components/Amount.tsx b/src/components/Amount.tsx index 4e28499a..df2c01a6 100644 --- a/src/components/Amount.tsx +++ b/src/components/Amount.tsx @@ -18,6 +18,7 @@ export function AmountSats(props: { amountSats: bigint | number | undefined; icon?: "lightning" | "community" | "chain" | "plus" | "minus"; denominationSize?: "sm" | "lg" | "xl"; + isFederation?: boolean; }) { const i18n = useI18n(); return ( @@ -54,14 +55,18 @@ export function AmountSats(props: { Number(props.amountSats) === 0 } > - {i18n.t("common.sats")} + {props.isFederation + ? i18n.t("common.e_sats") + : i18n.t("common.sats")} - {i18n.t("common.sat")} + {props.isFederation + ? i18n.t("common.e_sat") + : i18n.t("common.sat")} diff --git a/src/components/BalanceBox.tsx b/src/components/BalanceBox.tsx index 40821db5..b0ddba93 100644 --- a/src/components/BalanceBox.tsx +++ b/src/components/BalanceBox.tsx @@ -100,6 +100,7 @@ export function BalanceBox(props: { loading?: boolean }) { amountSats={state.balance?.federation || 0} icon="community" denominationSize="lg" + isFederation />
diff --git a/src/i18n/en/translations.ts b/src/i18n/en/translations.ts index 6d32bb8a..c9c9eff4 100644 --- a/src/i18n/en/translations.ts +++ b/src/i18n/en/translations.ts @@ -3,6 +3,8 @@ export default { title: "Mutiny Wallet", nice: "Nice", home: "Home", + e_sats: "eSATS", + e_sat: "eSat", sats: "SATS", sat: "SAT", fee: "Fee", diff --git a/src/routes/settings/ManageFederations.tsx b/src/routes/settings/ManageFederations.tsx index ead77b4c..e3860dea 100644 --- a/src/routes/settings/ManageFederations.tsx +++ b/src/routes/settings/ManageFederations.tsx @@ -185,6 +185,7 @@ function FederationListItem(props: {