diff --git a/src/components/AmountEditable.tsx b/src/components/AmountEditable.tsx index a77278e..1d9734f 100644 --- a/src/components/AmountEditable.tsx +++ b/src/components/AmountEditable.tsx @@ -5,7 +5,9 @@ import { createResource, createSignal, onMount, - onCleanup + onCleanup, + Switch, + Match } from "solid-js"; import { Button } from "~/components/layout"; import { useMegaStore } from "~/state/megaStore"; @@ -254,6 +256,18 @@ export const AmountEditable: ParentComponent<{ return undefined; }; + const betaWarning = () => { + const parsed = Number(localSats()); + if (isNaN(parsed)) { + return undefined; + } + + // If over 4 million sats, warn that it's a beta bro + if (parsed >= 4000000) { + return i18n.t("too_big_for_beta"); + } + }; + function handleCharacterInput(character: string) { const isFiatMode = mode() === "fiat"; const inputSanitizer = isFiatMode @@ -401,7 +415,9 @@ export const AmountEditable: ParentComponent<{ {i18n.t("set_amount")} +
+ {i18n.t("set_amount")} +
} > @@ -472,11 +488,20 @@ export const AmountEditable: ParentComponent<{ /> - - - {warningText()} - - + + + + {betaWarning()} + + + + + {warningText()} + + +