mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-23 07:04:19 +01:00
better warnings default
This commit is contained in:
committed by
Tony Giorgio
parent
f5ce8e2c33
commit
51dd99a62c
@@ -76,7 +76,7 @@ export function AmountCard(props: {
|
||||
initialOpen?: boolean;
|
||||
isAmountEditable?: boolean;
|
||||
setAmountSats?: (amount: bigint) => void;
|
||||
skipWarnings?: boolean;
|
||||
showWarnings?: boolean;
|
||||
exitRoute?: string;
|
||||
maxAmountSats?: bigint;
|
||||
}) {
|
||||
@@ -116,7 +116,9 @@ export function AmountCard(props: {
|
||||
? props.setAmountSats
|
||||
: noop
|
||||
}
|
||||
skipWarnings={props.skipWarnings}
|
||||
showWarnings={
|
||||
props.showWarnings ?? false
|
||||
}
|
||||
exitRoute={props.exitRoute}
|
||||
maxAmountSats={props.maxAmountSats}
|
||||
fee={props.fee}
|
||||
@@ -185,7 +187,9 @@ export function AmountCard(props: {
|
||||
? props.setAmountSats
|
||||
: noop
|
||||
}
|
||||
skipWarnings={props.skipWarnings}
|
||||
showWarnings={
|
||||
props.showWarnings ?? false
|
||||
}
|
||||
exitRoute={props.exitRoute}
|
||||
maxAmountSats={props.maxAmountSats}
|
||||
fee={props.fee}
|
||||
|
||||
@@ -262,7 +262,7 @@ export const AmountEditable: ParentComponent<{
|
||||
initialAmountSats: string;
|
||||
initialOpen: boolean;
|
||||
setAmountSats: (s: bigint) => void;
|
||||
skipWarnings?: boolean;
|
||||
showWarnings: boolean;
|
||||
exitRoute?: string;
|
||||
maxAmountSats?: bigint;
|
||||
fee?: string;
|
||||
@@ -781,7 +781,7 @@ export const AmountEditable: ParentComponent<{
|
||||
</InfoBox>
|
||||
</Match>
|
||||
<Match
|
||||
when={warningText() && !props.skipWarnings}
|
||||
when={warningText() && props.showWarnings}
|
||||
>
|
||||
<InfoBox accent="blue">
|
||||
{warningText()} <FeesModal />
|
||||
|
||||
@@ -109,11 +109,11 @@ export function NWCBudgetEditor(props: {
|
||||
{(field, _fieldProps) => (
|
||||
<div class="flex flex-col items-end gap-2">
|
||||
<AmountEditable
|
||||
skipWarnings={true}
|
||||
initialOpen={false}
|
||||
initialAmountSats={
|
||||
field.value || "0"
|
||||
}
|
||||
showWarnings={false}
|
||||
setAmountSats={(a) => {
|
||||
setValue(
|
||||
budgetForm,
|
||||
|
||||
@@ -386,6 +386,7 @@ export default function Receive() {
|
||||
setAmountSats={setAmount}
|
||||
isAmountEditable
|
||||
exitRoute={amount() ? "/receive" : "/"}
|
||||
showWarnings
|
||||
/>
|
||||
|
||||
<Card title={i18n.t("common.private_tags")}>
|
||||
|
||||
@@ -700,7 +700,6 @@ export default function Send() {
|
||||
fee={feeEstimate()?.toString()}
|
||||
isAmountEditable={isAmtEditable()}
|
||||
maxAmountSats={maxAmountSats()}
|
||||
skipWarnings={true}
|
||||
/>
|
||||
</Match>
|
||||
<Match when={true}>
|
||||
|
||||
@@ -435,7 +435,6 @@ export default function Swap() {
|
||||
setAmountSats={setAmountSats}
|
||||
fee={feeEstimate()?.toString()}
|
||||
isAmountEditable={true}
|
||||
skipWarnings={true}
|
||||
maxAmountSats={maxOnchain()}
|
||||
/>
|
||||
<Show when={amountWarning() && amountSats() > 0n}>
|
||||
|
||||
Reference in New Issue
Block a user