mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-17 22:34:23 +01:00
on-chain warnings and hide zero amounts
This commit is contained in:
@@ -148,7 +148,9 @@
|
||||
"body": "Lightning receives will automatically go into your chosen federation. You can swap to self-custodial later if you want."
|
||||
},
|
||||
"receive_strings_error": "Something went wrong generating an invoice or on-chain address.",
|
||||
"error_under_min_onchain": "That's under the dust limit! On-chain transactions should be much bigger."
|
||||
"error_under_min_onchain": "That's under the dust limit! On-chain transactions should be much bigger.",
|
||||
"warning_on_chain_fedi": "On-chain fedimint deposits require 10 confirmations.",
|
||||
"warning_address_reuse": "Only send to this address once!"
|
||||
},
|
||||
"send": {
|
||||
"search": {
|
||||
|
||||
@@ -168,7 +168,7 @@ function OnchainHeader(props: { info: OnChainTx; kind?: HackActivityType }) {
|
||||
</Match>
|
||||
</Switch>
|
||||
</div>
|
||||
<Show when={props.kind !== "ChannelClose"}>
|
||||
<Show when={props.kind !== "ChannelClose" && Number(amount()) > 0}>
|
||||
<div class="flex flex-col items-center">
|
||||
<div
|
||||
class="text-2xl"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createResource, Match, Switch } from "solid-js";
|
||||
import { createMemo, createResource, Match, Switch } from "solid-js";
|
||||
|
||||
import { InfoBox } from "~/components/InfoBox";
|
||||
import { FeesModal } from "~/components/MoreInfoModal";
|
||||
@@ -79,6 +79,12 @@ export function ReceiveWarnings(props: {
|
||||
}
|
||||
};
|
||||
|
||||
const onChainFedi = createMemo(() => {
|
||||
if (props.flavor === "onchain" && state.federations?.length) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<Switch>
|
||||
<Match when={tooSmallWarning()}>
|
||||
@@ -92,6 +98,11 @@ export function ReceiveWarnings(props: {
|
||||
{warningText()} <FeesModal />
|
||||
</InfoBox>
|
||||
</Match>
|
||||
<Match when={onChainFedi()}>
|
||||
<InfoBox accent="blue">
|
||||
{i18n.t("receive.warning_on_chain_fedi")}
|
||||
</InfoBox>
|
||||
</Match>
|
||||
</Switch>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -460,6 +460,11 @@ export function Receive() {
|
||||
<p>{error()}</p>
|
||||
</InfoBox>
|
||||
</Show>
|
||||
<Show when={flavor() === "onchain"}>
|
||||
<InfoBox accent="blue">
|
||||
{i18n.t("receive.warning_address_reuse")}
|
||||
</InfoBox>
|
||||
</Show>
|
||||
<IntegratedQr
|
||||
value={qrString() ?? ""}
|
||||
amountSats={amount() ? amount().toString() : "0"}
|
||||
|
||||
Reference in New Issue
Block a user