Skip to content

Commit

Permalink
fix: CR-624
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv committed Oct 9, 2023
1 parent 7194085 commit 6e7e51b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/components/ClassicElasticTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ function ClassicElasticTab() {

const dontShowLegacy = [ChainId.ZKEVM, ChainId.BASE, ChainId.LINEA].includes(chainId)

useEffect(() => {
if (dontShowLegacy && tab === VERSION.ELASTIC_LEGACY) {
const newQs = { ...qs, tab: VERSION.ELASTIC }
navigate({ search: stringify(newQs) }, { replace: true })
}
}, [tab, dontShowLegacy, navigate, qs])

const legacyTag = (small?: boolean) => (
<Text
sx={{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ElasticLegacy/FarmLegacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default function FarmLegacy({
}
}

const farmContract = useProMMFarmContract(config[chainId].farmContract || '')
const farmContract = useProMMFarmContract(config[chainId]?.farmContract || '')

const handleWithdraw = async () => {
setShowConfirmModal('withdraw')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,12 @@ const PositionView: React.FC<CommonProps> = props => {
<Text as="span" fontSize="16px" fontWeight={500} lineHeight={'20px'}>
{+positionEarning.pendingRewardUSD
? formatDisplayNumber(positionEarning.pendingRewardUSD, { style: 'currency', significantDigits: 6 })
: farmRewards?.length
? '$0'
: '--'}
</Text>
}
disabled={!+positionEarning.pendingRewardUSD}
disabled={disabledHarvest}
text={
<>
{farmRewards?.map((rw, index) => (
Expand Down

0 comments on commit 6e7e51b

Please sign in to comment.