From 0c40e5146e99b60f4c1988bd3cc948a92e240b4b Mon Sep 17 00:00:00 2001 From: kwoktung Date: Thu, 9 Nov 2023 10:54:31 +0800 Subject: [PATCH] fix: v4 matic unstake price display error --- packages/kit/src/views/Staking/LidoMaticUnstake/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/kit/src/views/Staking/LidoMaticUnstake/index.tsx b/packages/kit/src/views/Staking/LidoMaticUnstake/index.tsx index 3e94f751a46..2cfd1aff3b2 100644 --- a/packages/kit/src/views/Staking/LidoMaticUnstake/index.tsx +++ b/packages/kit/src/views/Staking/LidoMaticUnstake/index.tsx @@ -34,6 +34,7 @@ import { formatAmount } from '../../../utils/priceUtils'; import { SendModalRoutes } from '../../Send/types'; import { useSwapSubmit } from '../../Swap/hooks/useSwapSubmit'; import { div, formatAmountExact, multiply } from '../../Swap/utils'; +import { getMaticContractAdderess } from '../address'; import { StakingKeyboard } from '../components/StakingKeyboard'; import { useLidoMaticOverview } from '../hooks'; import { getStMaticToMaticQuote } from '../quote'; @@ -151,7 +152,10 @@ export default function LidoMaticUnstake() { params: { networkId, accountId }, } = useRoute(); const navigation = useNavigation(); - const mainPrice = useSimpleTokenPriceValue({ networkId }); + const mainPrice = useSimpleTokenPriceValue({ + networkId, + contractAdress: getMaticContractAdderess(networkId), + }); const lidoOverview = useLidoMaticOverview(networkId, accountId); const balance = lidoOverview?.balance ?? '0'; const tokenSymbol = 'stMatic';