From 64772decc35dcd5c24920e91034db252ee840cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Von=C3=A1=C5=A1ek?= Date: Tue, 27 Feb 2024 18:20:13 +0100 Subject: [PATCH] gas station update --- src/assets/icons/GasPumpIcon.svg | 3 ++ .../transactions/GasStation/GasStation.tsx | 28 ++++++++----------- .../reserve-overview/ReserveActions.tsx | 5 ++-- 3 files changed, 17 insertions(+), 19 deletions(-) create mode 100644 src/assets/icons/GasPumpIcon.svg diff --git a/src/assets/icons/GasPumpIcon.svg b/src/assets/icons/GasPumpIcon.svg new file mode 100644 index 000000000..183f5e616 --- /dev/null +++ b/src/assets/icons/GasPumpIcon.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/sections/lending/components/transactions/GasStation/GasStation.tsx b/src/sections/lending/components/transactions/GasStation/GasStation.tsx index ed3115651..f4298e76b 100644 --- a/src/sections/lending/components/transactions/GasStation/GasStation.tsx +++ b/src/sections/lending/components/transactions/GasStation/GasStation.tsx @@ -1,10 +1,9 @@ import { API_ETH_MOCK_ADDRESS } from "@aave/contract-helpers" import { normalize } from "@aave/math-utils" -import LocalGasStationIcon from "@mui/icons-material/LocalGasStation" -import { Box, CircularProgress, Stack } from "@mui/material" import { DisplayValue } from "components/DisplayValue/DisplayValue" import { InfoTooltip } from "components/InfoTooltip/InfoTooltip" import { SInfoIcon } from "components/InfoTooltip/InfoTooltip.styled" +import { Spinner } from "components/Spinner/Spinner.styled" import { Text } from "components/Typography/Text/Text" import { BigNumber } from "ethers/lib/ethers" import { formatUnits, parseUnits } from "ethers/lib/utils" @@ -25,6 +24,7 @@ import { } from "sections/lending/utils/marketsAndNetworksConfig" import invariant from "tiny-invariant" import { GasOption } from "./GasStationProvider" +import GasPumpIcon from "assets/icons/GasPumpIcon.svg?react" export interface GasStationProps { gasLimit: BigNumber @@ -90,17 +90,13 @@ export const GasStation: React.FC = ({ : undefined return ( - - - - - +
+
+
+ {loadingTxns && !skipLoad ? (
- +
) : totalGasCostsUsd && !disabled ? ( <> @@ -114,18 +110,18 @@ export const GasStation: React.FC = ({ ) : ( "-" )} - +
{rightComponent} - +
{!disabled && Number(nativeBalanceUSD) < Number(totalGasCostsUsd) && ( - +
You do not have enough {baseAssetSymbol} in your account to pay for transaction fees on {name} network. Please deposit {baseAssetSymbol}{" "} from another account. - +
)} - +
) } diff --git a/src/sections/lending/modules/reserve-overview/ReserveActions.tsx b/src/sections/lending/modules/reserve-overview/ReserveActions.tsx index 3c47333cf..042715e8b 100644 --- a/src/sections/lending/modules/reserve-overview/ReserveActions.tsx +++ b/src/sections/lending/modules/reserve-overview/ReserveActions.tsx @@ -332,7 +332,7 @@ const SupplyAction = ({ }: ActionProps) => { const { t } = useTranslation() return ( -
+
{ const { t } = useTranslation() return ( -
+