mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-10 08:44:20 +01:00
show fee explanation even for single sat
This commit is contained in:
committed by
Tony Giorgio
parent
b0d36cb1e2
commit
979697492d
@@ -41,7 +41,9 @@ export function AmountSmall(props: {
|
||||
return (
|
||||
<span class="font-light">
|
||||
{prettyPrintAmount(props.amountSats)}
|
||||
<span class="text-sm">SATS</span>
|
||||
<span class="text-sm">
|
||||
{props.amountSats === 1 || props.amountSats === 1n ? "SAT" : "SATS"}
|
||||
</span>
|
||||
</span>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -98,12 +98,20 @@ function FeeWarning(props: { fee: bigint; flavor: ReceiveFlavor }) {
|
||||
function FeeExplanation(props: { fee: bigint }) {
|
||||
return (
|
||||
// TODO: probably won't always be a fixed 2500?
|
||||
<Show when={props.fee > 1000n}>
|
||||
<InfoBox accent="green">
|
||||
A lightning setup fee of <AmountSmall amountSats={props.fee} /> was charged for this
|
||||
receive.
|
||||
</InfoBox>
|
||||
</Show>
|
||||
<Switch>
|
||||
<Match when={props.fee > 1000n}>
|
||||
<InfoBox accent="green">
|
||||
A lightning setup fee of <AmountSmall amountSats={props.fee} /> was charged for this
|
||||
receive.
|
||||
</InfoBox>
|
||||
</Match>
|
||||
<Match when={props.fee > 0n}>
|
||||
<InfoBox accent="green">
|
||||
A lightning service fee of <AmountSmall amountSats={props.fee} /> was charged for this
|
||||
receive.
|
||||
</InfoBox>
|
||||
</Match>
|
||||
</Switch>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user