diff --git a/package.json b/package.json index 09a32ba44..557f5fa69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "app-v2", - "version": "2.4.25", + "version": "2.4.26", "private": true, "dependencies": { "@ethersproject/providers": "^5.6.8", diff --git a/src/components/selectors/SeriesSelector.tsx b/src/components/selectors/SeriesSelector.tsx index e1f6d6cd1..ff1344822 100644 --- a/src/components/selectors/SeriesSelector.tsx +++ b/src/components/selectors/SeriesSelector.tsx @@ -76,7 +76,7 @@ const AprText = ({ actionType, color, }: { - inputValue: string | undefined; + inputValue: string; series: ISeries; actionType: ActionType; color: string; diff --git a/src/components/views/Borrow.tsx b/src/components/views/Borrow.tsx index 68059ebdc..f8a006106 100644 --- a/src/components/views/Borrow.tsx +++ b/src/components/views/Borrow.tsx @@ -76,7 +76,10 @@ const Borrow = () => { const [stepPosition, setStepPosition] = useState(0); // renderId for user flow traking (analytics) - const [renderId, setRenderId] = useState(); + // const [renderId, setRenderId] = useState(); + // useEffect(() => { + // setRenderId(new Date().getTime().toString(36)); + // }, []); const [borrowInput, setBorrowInput] = useState(''); const [collatInput, setCollatInput] = useState(''); @@ -146,9 +149,7 @@ const Borrow = () => { } as GA_Properties.transaction_initiated); }; - useEffect(() => { - setRenderId(new Date().getTime().toString(36)); - }, []); + /** Interaction handlers */ const handleNavAction = (_stepPosition: number) => { diff --git a/src/components/views/Lend.tsx b/src/components/views/Lend.tsx index 11079f376..fb6379872 100644 --- a/src/components/views/Lend.tsx +++ b/src/components/views/Lend.tsx @@ -8,7 +8,7 @@ import AssetSelector from '../selectors/AssetSelector'; import InputWrap from '../wraps/InputWrap'; import MainViewWrap from '../wraps/MainViewWrap'; import SeriesSelector from '../selectors/SeriesSelector'; -import { cleanValue, getTxCode, nFormatter } from '../../utils/appUtils'; +import { cleanValue, nFormatter } from '../../utils/appUtils'; import SectionWrap from '../wraps/SectionWrap'; import { UserContext } from '../../contexts/UserContext'; @@ -53,7 +53,7 @@ const Lend = () => { /* LOCAL STATE */ const [modalOpen, toggleModal] = useState(false); - const [lendInput, setLendInput] = useState(undefined); + const [lendInput, setLendInput] = useState(''); // const [maxLend, setMaxLend] = useState(); const [lendDisabled, setLendDisabled] = useState(true); const [stepPosition, setStepPosition] = useState(0); @@ -100,7 +100,7 @@ const Lend = () => { }; const resetInputs = useCallback(() => { - setLendInput(undefined); + setLendInput(''); setStepPosition(0); resetLendProcess(); }, [resetLendProcess]); @@ -156,7 +156,7 @@ const Lend = () => { type="number" inputMode="decimal" placeholder="Enter amount" - value={lendInput || ''} + value={lendInput} onChange={(event: any) => setLendInput(cleanValue(event.target.value, selectedSeries?.decimals)) } diff --git a/src/components/views/LendPosition.tsx b/src/components/views/LendPosition.tsx index 8dd7ddc60..1e8144663 100644 --- a/src/components/views/LendPosition.tsx +++ b/src/components/views/LendPosition.tsx @@ -6,7 +6,7 @@ import { FiArrowRight, FiChevronDown, FiClock, FiTool, FiTrendingUp } from 'reac import ActionButtonGroup from '../wraps/ActionButtonWrap'; import InputWrap from '../wraps/InputWrap'; import SeriesSelector from '../selectors/SeriesSelector'; -import { abbreviateHash, cleanValue, getTxCode, nFormatter } from '../../utils/appUtils'; +import { abbreviateHash, cleanValue, nFormatter } from '../../utils/appUtils'; import SectionWrap from '../wraps/SectionWrap'; import { UserContext } from '../../contexts/UserContext'; diff --git a/src/hooks/useApr.ts b/src/hooks/useApr.ts index bbe7996dd..fcf4d3256 100644 --- a/src/hooks/useApr.ts +++ b/src/hooks/useApr.ts @@ -19,7 +19,7 @@ export const useApr = (input: string | undefined, actionType: ActionType, series const _selectedSeries = series || selectedSeries; /* Make sure there won't be an underflow */ - const _fallbackInput = ETH_BASED_ASSETS.includes(series?.baseId!) ? '.001' : '1'; + const _fallbackInput = ETH_BASED_ASSETS.includes(series?.baseId!) ? '0.01' : '1'; const _input = Number(input) === 0 ? _fallbackInput : cleanValue(input, _selectedSeries?.decimals); /* LOCAL STATE */