don't show warnings if it's a swap

This commit is contained in:
Paul Miller
2023-06-09 11:36:20 -05:00
parent 23af8f576c
commit cff499888b
3 changed files with 6 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ export function AmountCard(props: {
initialOpen?: boolean;
isAmountEditable?: boolean;
setAmountSats?: (amount: bigint) => void;
skipWarnings?: boolean;
}) {
return (
<Card>
@@ -96,6 +97,7 @@ export function AmountCard(props: {
? props.setAmountSats
: noop
}
skipWarnings={props.skipWarnings}
/>
</Show>
</KeyValue>
@@ -163,6 +165,7 @@ export function AmountCard(props: {
? props.setAmountSats
: noop
}
skipWarnings={props.skipWarnings}
/>
</Show>
</KeyValue>

View File

@@ -137,6 +137,7 @@ export const AmountEditable: ParentComponent<{
initialAmountSats: string;
initialOpen: boolean;
setAmountSats: (s: bigint) => void;
skipWarnings?: boolean;
}> = (props) => {
const [isOpen, setIsOpen] = createSignal(props.initialOpen);
const [state, _actions] = useMegaStore();
@@ -357,7 +358,7 @@ export const AmountEditable: ParentComponent<{
fiat={mode() !== "fiat"}
/>
</div>
<Show when={warningText()}>
<Show when={warningText() && !props.skipWarnings}>
<InfoBox accent="blue">
{warningText()} <FeesModal />
</InfoBox>