Skip to content

Commit

Permalink
Merge pull request #192 from near-ndc/develop
Browse files Browse the repository at this point in the history
 Fair voting policy link update (#190)
  • Loading branch information
Megha-Dev-19 authored Aug 24, 2023
2 parents de052f1 + f6aa215 commit 456d688
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
};

0 comments on commit 456d688

Please sign in to comment.