From 6c8009109058ba48dafc022a2b21c4517bc62034 Mon Sep 17 00:00:00 2001 From: Thomas Brillard Date: Mon, 9 Sep 2024 11:30:03 +0200 Subject: [PATCH] fix: remove errors in drawer --- .changeset/happy-onions-know.md | 5 +++ .../families/bitcoin/SendAmountFields.tsx | 33 ------------------- 2 files changed, 5 insertions(+), 33 deletions(-) create mode 100644 .changeset/happy-onions-know.md diff --git a/.changeset/happy-onions-know.md b/.changeset/happy-onions-know.md new file mode 100644 index 000000000000..9610c439bc9f --- /dev/null +++ b/.changeset/happy-onions-know.md @@ -0,0 +1,5 @@ +--- +"ledger-live-desktop": minor +--- + +fix: remove error from btc fee drawer diff --git a/apps/ledger-live-desktop/src/renderer/families/bitcoin/SendAmountFields.tsx b/apps/ledger-live-desktop/src/renderer/families/bitcoin/SendAmountFields.tsx index 2dd242d928a9..3b684e45b92f 100644 --- a/apps/ledger-live-desktop/src/renderer/families/bitcoin/SendAmountFields.tsx +++ b/apps/ledger-live-desktop/src/renderer/families/bitcoin/SendAmountFields.tsx @@ -15,13 +15,6 @@ import CoinControlModal from "./CoinControlModal"; import { FeesField } from "./FeesField"; import { BitcoinFamily } from "./types"; import useBitcoinPickingStrategy from "./useBitcoinPickingStrategy"; -import Alert from "~/renderer/components/Alert"; -import TranslatedError from "~/renderer/components/TranslatedError"; -import { useDispatch } from "react-redux"; -import { useHistory } from "react-router"; -import { closeAllModal } from "~/renderer/actions/modals"; -import { setTrackingSource } from "~/renderer/analytics/TrackPage"; -import { Flex } from "@ledgerhq/react-ui"; type Props = NonNullable["component"]; @@ -53,25 +46,6 @@ const Fields: Props = ({ const { item } = useBitcoinPickingStrategy(transaction.utxoStrategy.strategy); const canNext = account.bitcoinResources?.utxos?.length; - const dispatch = useDispatch(); - const history = useHistory(); - - const onBuyClick = useCallback(() => { - dispatch(closeAllModal()); - setTrackingSource("send flow"); - history.push({ - pathname: "/exchange", - state: { - currency: account.currency.id, - account: account.id, - mode: "buy", // buy or sell - }, - }); - }, [account.currency.id, account.id, dispatch, history]); - - const { errors } = status; - const { amount: messageAmount } = errors; - /* TODO: How do we set default RBF to be true ? (@gre) * Meanwhile, using this trick (please don't kill me) */ @@ -183,13 +157,6 @@ const Fields: Props = ({ mapStrategies={mapStrategies} status={status} /> - {messageAmount && ( - - - - - - )} )}