mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-24 01:24:28 +01:00
feat: add esats for federations
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -185,6 +185,7 @@ function FederationListItem(props: {
|
||||
<AmountSats
|
||||
amountSats={props.balance}
|
||||
denominationSize={"sm"}
|
||||
isFederation
|
||||
/>
|
||||
</KeyValue>
|
||||
</Show>
|
||||
|
||||
Reference in New Issue
Block a user