From c3f3ca343a78ae08b156ac30234b7dc53a135b9f Mon Sep 17 00:00:00 2001 From: Ezerous Date: Mon, 21 Dec 2020 16:21:25 +0200 Subject: [PATCH] Fix for removed contract function --- packages/concordia-app/src/views/Home/index.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/concordia-app/src/views/Home/index.jsx b/packages/concordia-app/src/views/Home/index.jsx index 69305ba..989d684 100644 --- a/packages/concordia-app/src/views/Home/index.jsx +++ b/packages/concordia-app/src/views/Home/index.jsx @@ -8,20 +8,20 @@ import './styles.css'; import { drizzle } from '../../redux/store'; import { FORUM_CONTRACT } from '../../constants/contracts/ContractNames'; -const { contracts: { [FORUM_CONTRACT]: { methods: { getNumberOfTopics } } } } = drizzle; +const { contracts: { [FORUM_CONTRACT]: { methods: { numTopics } } } } = drizzle; const Home = () => { const [numberOfTopicsCallHash, setNumberOfTopicsCallHash] = useState(''); - const getNumberOfTopicsResults = useSelector((state) => state.contracts[FORUM_CONTRACT].getNumberOfTopics); + const numTopicsResults = useSelector((state) => state.contracts[FORUM_CONTRACT].numTopics); useEffect(() => { - setNumberOfTopicsCallHash(getNumberOfTopics.cacheCall()); + setNumberOfTopicsCallHash(numTopics.cacheCall()); }, []); - const numberOfTopics = useMemo(() => (getNumberOfTopicsResults[numberOfTopicsCallHash] !== undefined - ? parseInt(getNumberOfTopicsResults[numberOfTopicsCallHash].value, 10) + const numberOfTopics = useMemo(() => (numTopicsResults[numberOfTopicsCallHash] !== undefined + ? parseInt(numTopicsResults[numberOfTopicsCallHash].value, 10) : null), - [getNumberOfTopicsResults, numberOfTopicsCallHash]); + [numTopicsResults, numberOfTopicsCallHash]); return useMemo(() => (