From b54fbfe9084fe7e74f25a869d1da77e6d741f33f Mon Sep 17 00:00:00 2001 From: Kacper Szarkiewicz <43585069+Sharqiewicz@users.noreply.github.com> Date: Wed, 21 Aug 2024 09:49:09 +0200 Subject: [PATCH] UI fixes for the vortex app (#96) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update benefits list * update navbar urls * implement validation of user's USDC polygon balance * Hide 'Select Chain' button * show available usdc/usdc.e balance * update yarnlock file * Make naming more generic --------- Co-authored-by: Torsten Stùˆber <15174476+TorstenStueber@users.noreply.github.com> --- src/components/AssetNumericInput/index.tsx | 2 +- src/components/BenefitsList/index.tsx | 12 +- src/components/Navbar/index.tsx | 12 +- src/components/UserBalance/index.tsx | 23 +++ src/constants/abi/simplifiedERC20ABI.json | 34 ++++ src/hooks/nabla/useTokenAmountOut.ts | 4 +- src/hooks/useInputTokenBalance.ts | 22 +++ src/pages/swap/index.tsx | 42 +++-- yarn.lock | 174 ++++++++++----------- 9 files changed, 209 insertions(+), 116 deletions(-) create mode 100644 src/components/UserBalance/index.tsx create mode 100644 src/constants/abi/simplifiedERC20ABI.json create mode 100644 src/hooks/useInputTokenBalance.ts diff --git a/src/components/AssetNumericInput/index.tsx b/src/components/AssetNumericInput/index.tsx index ea8d19e2..da752c2c 100644 --- a/src/components/AssetNumericInput/index.tsx +++ b/src/components/AssetNumericInput/index.tsx @@ -15,7 +15,7 @@ export const ChainName = () => ( return ( ); }} diff --git a/src/components/BenefitsList/index.tsx b/src/components/BenefitsList/index.tsx index add956c3..ceecd13c 100644 --- a/src/components/BenefitsList/index.tsx +++ b/src/components/BenefitsList/index.tsx @@ -2,24 +2,16 @@ import { CheckIcon } from '@heroicons/react/20/solid'; import { FC } from 'preact/compat'; import Big from 'big.js'; -/// The factor we use to derive the amount we estimate the user to save using our transfer method. -const AMOUNT_SAVED_FACTOR = 0.03; - interface BenefitsListProps { amount: Big | undefined; currency: string; } -export const BenefitsList: FC = ({ amount, currency }) => ( +export const BenefitsList: FC = () => (