From b13449161a0fad266b8989d36b7cd3520c5ba95b Mon Sep 17 00:00:00 2001 From: Jack <905182279@qq.com> Date: Wed, 3 Apr 2024 19:29:55 +0800 Subject: [PATCH] feat: replace the binance interface --- src/welcome/Profile/Reward.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/welcome/Profile/Reward.tsx b/src/welcome/Profile/Reward.tsx index 6213f6a..75f3c35 100644 --- a/src/welcome/Profile/Reward.tsx +++ b/src/welcome/Profile/Reward.tsx @@ -9,6 +9,7 @@ import dayjs from 'dayjs'; import { ListEmpty } from '../../components/Empty'; import { NumberDisplayer } from '../../components/NumberDisplayer'; +import { useEthPrice } from '../../service/share'; import { useTweetList } from '../../service/tweet'; import { usePoolBalance } from '../../service/wallet'; import useProfileModal from '../../store/useProfileModal'; @@ -49,6 +50,7 @@ const Reward = () => { ? tweetList?.findIndex((item) => item.author?.twitterId === userInfo?.twitterId) : -1; const { ethPrice } = useShareStore((state) => ({ ...state })); + const { run: getPrice } = useEthPrice(); const { loading, run: fetchPool } = usePoolBalance( (balance) => { @@ -78,6 +80,10 @@ const Reward = () => { fetchPool(); }, []); + useEffect(() => { + getPrice(); + }, []); + return ( <>