From dc3e134631a9810e41a801e1a428b11be8851477 Mon Sep 17 00:00:00 2001 From: Thomas Brillard Date: Mon, 9 Sep 2024 23:27:10 +0200 Subject: [PATCH] chore: I crave consistent behaviour --- .../SignTransaction/steps/StepAmount.tsx | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/apps/ledger-live-desktop/src/renderer/modals/SignTransaction/steps/StepAmount.tsx b/apps/ledger-live-desktop/src/renderer/modals/SignTransaction/steps/StepAmount.tsx index 9e7c667c82f9..71ae9cff27fb 100644 --- a/apps/ledger-live-desktop/src/renderer/modals/SignTransaction/steps/StepAmount.tsx +++ b/apps/ledger-live-desktop/src/renderer/modals/SignTransaction/steps/StepAmount.tsx @@ -10,6 +10,8 @@ import TranslatedError from "~/renderer/components/TranslatedError"; import AccountFooter from "../AccountFooter"; import SendAmountFields from "../SendAmountFields"; import { StepProps } from "../types"; +import LowGasAlertBuyMore from "~/renderer/families/evm/SendAmountFields/LowGasAlertBuyMore"; +import { closeAllModal } from "~/renderer/actions/modals"; const StepAmount = ({ account, parentAccount, @@ -23,15 +25,19 @@ const StepAmount = ({ }: StepProps) => { if (!status) return null; const mainAccount = account ? getMainAccount(account, parentAccount) : null; + const { gasPrice: gasPriceError } = status.errors; + return ( {mainAccount ? : null} - {error || warning ? ( - - - - ) : null} + {error || warning + ? !gasPriceError && ( + + + + ) + : null} {account && transaction && mainAccount && ( )} + {mainAccount && gasPriceError && ( + + )} ); };