feat: add esats for federations

This commit is contained in:
benalleng
2024-02-03 17:23:05 -05:00
committed by Paul Miller
parent ae44a83087
commit ece52601b8
5 changed files with 12 additions and 3 deletions

View File

@@ -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();

View File

@@ -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")}
</Show>
<Show
when={
props.amountSats && Number(props.amountSats) === 1
}
>
{i18n.t("common.sat")}
{props.isFederation
? i18n.t("common.e_sat")
: i18n.t("common.sat")}
</Show>
</span>
</h1>

View File

@@ -100,6 +100,7 @@ export function BalanceBox(props: { loading?: boolean }) {
amountSats={state.balance?.federation || 0}
icon="community"
denominationSize="lg"
isFederation
/>
</div>
<div class="text-lg text-white/70">

View File

@@ -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",

View File

@@ -185,6 +185,7 @@ function FederationListItem(props: {
<AmountSats
amountSats={props.balance}
denominationSize={"sm"}
isFederation
/>
</KeyValue>
</Show>