diff --git a/src/components/AdvancedFarmComponents/Deposit/DepositStart/index.js b/src/components/AdvancedFarmComponents/Deposit/DepositStart/index.js
index 16303c28..492bb9c9 100644
--- a/src/components/AdvancedFarmComponents/Deposit/DepositStart/index.js
+++ b/src/components/AdvancedFarmComponents/Deposit/DepositStart/index.js
@@ -67,10 +67,13 @@ const DepositStart = ({
const { fetchUserPoolStats, userStats } = usePools()
const { getPortalsApproval, portalsApprove, getPortals } = usePortals()
- const chainId = token.chain || token.data.chain
+ let pickedDefaultToken
+ if (pickedToken.symbol !== 'Select Token' && defaultToken) {
+ pickedDefaultToken = pickedToken.address.toLowerCase() === defaultToken.address.toLowerCase()
+ }
+ const chainId = token.chain || token.data.chain
const amount = toWei(inputAmount, pickedToken.decimals)
-
const toToken = token.vaultAddress || token.tokenAddress
const [slippagePercentage, setSlippagePercentage] = useState(null)
@@ -155,8 +158,6 @@ const DepositStart = ({
}
const startDeposit = async () => {
- const pickedDefaultToken =
- pickedToken.address.toLowerCase() === defaultToken.address.toLowerCase()
if (progressStep === 0) {
setStartSpinner(true)
setProgressStep(1)
@@ -401,7 +402,7 @@ const DepositStart = ({
)}
- {progressStep === 4 ? (
+ {!pickedDefaultToken && progressStep === 4 ? (
receiveAmount !== '' ? (
receiveAmount
) : (
@@ -419,16 +420,16 @@ const DepositStart = ({
{useIFARM ? `i${tokenSymbol}` : `f${tokenSymbol}`}
- {progressStep === 4 ? (
+ {!pickedDefaultToken && progressStep === 4 ? (
receiveUsd !== '' ? (
- <>≈ ${receiveUsd}>
+ <>≈${receiveUsd}>
) : (
- <>≈ $0>
+ <>≈$0>
)
) : minReceiveUsdAmount !== '' ? (
- <>≈ ${minReceiveUsdAmount}>
+ <>≈${minReceiveUsdAmount}>
) : (
- <>≈ $0>
+ <>≈$0>
)}
diff --git a/src/components/AdvancedFarmComponents/Withdraw/WithdrawStart/index.js b/src/components/AdvancedFarmComponents/Withdraw/WithdrawStart/index.js
index 09621a64..29801848 100644
--- a/src/components/AdvancedFarmComponents/Withdraw/WithdrawStart/index.js
+++ b/src/components/AdvancedFarmComponents/Withdraw/WithdrawStart/index.js
@@ -81,6 +81,10 @@ const WithdrawStart = ({
const { getPortalsApproval, portalsApprove, getPortals } = usePortals()
+ let pickedDefaultToken
+ if (pickedToken.symbol !== 'Select' && defaultToken) {
+ pickedDefaultToken = pickedToken.address.toLowerCase() === defaultToken.address.toLowerCase()
+ }
const SlippageValues = [null, 0.1, 0.5, 1, 5]
const onInputSlippage = e => {
let inputValue = e.target.value
@@ -118,8 +122,6 @@ const WithdrawStart = ({
}
const startWithdraw = async () => {
- const pickedDefaultToken =
- pickedToken.address.toLowerCase() === defaultToken.address.toLowerCase()
if (progressStep === 0) {
setStartSpinner(true)
setProgressStep(1)
@@ -371,7 +373,7 @@ const WithdrawStart = ({
<>
- {progressStep === 4 ? (
+ {!pickedDefaultToken && progressStep === 4 ? (
revertedAmount !== '' ? (
revertedAmount
) : (
@@ -397,7 +399,7 @@ const WithdrawStart = ({
) : (
)} */}
- {progressStep === 4 ? (
+ {!pickedDefaultToken && progressStep === 4 ? (
revertedAmountUsd === 'NaN' || revertedAmountUsd === '' ? (
'-'
) : revertedAmountUsd !== '' ? (
diff --git a/src/pages/AdvancedFarm/index.js b/src/pages/AdvancedFarm/index.js
index 4991a051..877cd5e5 100644
--- a/src/pages/AdvancedFarm/index.js
+++ b/src/pages/AdvancedFarm/index.js
@@ -433,18 +433,18 @@ const AdvancedFarm = () => {
]
// Show vault info badge when platform is 'Lodestar' and firstly view
- const firstView = localStorage.getItem('firstView')
useEffect(() => {
const platform = useIFARM ? 'Harvest' : token.platform[0].toLowerCase()
if (platform.includes('lodestar')) {
setVaultInfoMessage(true)
}
+ const firstView = localStorage.getItem('firstView')
if (firstView === null || firstView === 'true') {
localStorage.setItem('firstView', true)
setFirstViewInfo(true)
}
- }, [token.platform, firstView, useIFARM])
+ }, [token.platform, useIFARM])
const closeBadge = () => {
setVaultInfoMessage(false)