From f6aa21522e4d6f13b3d3a3cedb3d54b5620aa427 Mon Sep 17 00:00:00 2001 From: Megha-Dev-19 <100185149+Megha-Dev-19@users.noreply.github.com> Date: Thu, 24 Aug 2023 23:10:26 +0530 Subject: [PATCH] Fair voting policy link update (#190) --- src/pages/index.js | 15 +++++++++------ src/utils/constants.js | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index 6f4906f..40ac485 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -102,12 +102,6 @@ const IndexPage = () => { wallet_identifier: wallet.accountId, }); } - if (data?.length > 0 && !data[0]?.['client_ip']) { - // add ip address - fpPromise - .then((fp) => fp.get()) - .then((result) => addIPAddr(result.visitorId)); - } } async function createOGEventLog() { @@ -153,6 +147,15 @@ const IndexPage = () => { } }, [fvToken, wallet.accountId]); + useEffect(() => { + // add ip address + if (isUserHuman) { + fpPromise + .then((fp) => fp.get()) + .then((result) => addIPAddr(result.visitorId)); + } + }, [isUserHuman]); + useEffect(() => { if (ogToken) { createOGEventLog(); diff --git a/src/utils/constants.js b/src/utils/constants.js index ff047f1..777bb82 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -115,5 +115,5 @@ export const Links = { WHISTLEBLOWER: 'https://medium.com/@neardigitalcollective/introducing-ndc-whistleblower-bounty-program-d4fe1b9fc5a0', FAIR_VOTING_POLICY: - 'https://bafkreifb4ahfglbq3knjtecqfvyhwb2nycozc3azn3gzanwzbe2xpynniu.ipfs.nftstorage.link/', + 'https://bafkreidwdxocdkfsv6srynw7ipnogfuw76fzncmxd5jv7furbsn5cp4bz4.ipfs.nftstorage.link/', };