Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
anudit committed Jun 7, 2022
1 parent 30f9f4d commit 4305830
Show file tree
Hide file tree
Showing 11 changed files with 17,825 additions and 22,557 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ scripts
.terraform
.terraform.lock.hcl
.terraformignore
*.ppk
*.pem
fly.toml
2 changes: 1 addition & 1 deletion cron/cacheV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function computeScoreData(address){
let resp = await convoInstance.omnid.computeTrustScore(
address,
computeConfig,
['coordinape', 'arcx', 'superrare', 'karma']
['coordinape', 'arcx']
);

for (const [key, value] of Object.entries(resp)) {
Expand Down
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ provider "aws" {

module "tf_next" {
source = "milliHQ/next-js/aws"

version = "0.13.2"
lambda_runtime = "nodejs16.x"
providers = {
aws.global_region = aws.global_region
}
Expand Down
6 changes: 3 additions & 3 deletions middlewares/withApikey.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ const withApikey = (next) => async (req, res) => {
return await next(req, res);
}

if (user_apikey == "CSS3EFgktCyrmUAR6rX9YT9fIjxAoB0fJGxWn9zp"){
return res.status(204).end(); // Just testing.
}
// if (user_apikey == "CSS3EFgktCyrmUAR6rX9YT9fIjxAoB0fJGxWn9zp"){
// return res.status(204).end(); // Just testing.
// }

const CAP = 1000000; //1M
let data = await getRedisData(client, user_apikey);
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
"@onflow/fcl": "^1.0.2",
"@portis/web3": "^4.0.7",
"@react-three/drei": "^9.11.3",
"@react-three/fiber": "^8.0.21",
"@react-three/fiber": "^8.0.22",
"@self.id/web": "0.4.0",
"@solana/web3.js": "^1.43.4",
"@solana/web3.js": "^1.43.5",
"@textile/hub": "^6.3.4",
"@theconvospace/sdk": "^0.4.16",
"@theconvospace/sdk": "^0.4.17",
"@uauth/js": "^1.1.0",
"@uauth/web3modal": "^1.1.0",
"@walletconnect/web3-provider": "^1.7.8",
Expand All @@ -53,7 +53,7 @@
"critters": "^0.0.16",
"dotenv": "^16.0.1",
"ethers": "^5.6.8",
"framer-motion": "^6.3.6",
"framer-motion": "^6.3.10",
"ioredis": "^5.0.6",
"js-cookie": "^3.0.1",
"jsonwebtoken": "^8.5.1",
Expand Down Expand Up @@ -88,11 +88,11 @@
},
"devDependencies": {
"@next/eslint-plugin-next": "^12.1.6",
"eslint": "^8.16.0",
"eslint": "^8.17.0",
"eslint-config-next": "^12.1.6",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"next-sitemap": "^3.0.3",
"next-sitemap": "^3.0.5",
"tf-next": "^0.13.2"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion pages/api/identity.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function calculateScore(address) {
let resp = await convoInstance.omnid.computeTrustScore(
address,
computeConfig,
['coordinape', 'arcx', 'superrare', 'karma']
['coordinape', 'arcx']
);

for (const [key, value] of Object.entries(resp)) {
Expand Down
2 changes: 1 addition & 1 deletion pages/api/zkidentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function calculateScore(address) {
let resp = await convoInstance.omnid.computeTrustScore(
address,
computeConfig,
['coordinape', 'arcx', 'superrare', 'karma']
['coordinape', 'arcx']
);

for (const [key, value] of Object.entries(resp)) {
Expand Down
30 changes: 20 additions & 10 deletions pages/embed/c/[commentId].js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,26 @@ import { addressToEns } from '@/utils/stringUtils';
export async function getServerSideProps(context) {

let commentData = await getComment(context.params.commentId);
let ensAdd = await addressToEns(commentData.author);
if (commentData){

if (Boolean(ensAdd) === true) {
commentData['authorENS'] = ensAdd;
}
let ensAdd = await addressToEns(commentData.author);

if (Boolean(ensAdd) === true) {
commentData['authorENS'] = ensAdd;
}

return {
props: {
comment: commentData
},
return {
props: {
comment: commentData
},
}
}
else {
return {
props: {
comment: false
}
}
}
}

Expand Down Expand Up @@ -142,7 +152,7 @@ const Card = ({comment}) => {
width="fit-content"
>
<Flex>
Invalid Address
Not Found
</Flex>

</Flex>
Expand All @@ -157,7 +167,7 @@ const Card = ({comment}) => {
}
};
Card.propTypes = {
comment: PropTypes.object
comment: PropTypes.any
}

export default Card;
Loading

1 comment on commit 4305830

@vercel
Copy link

@vercel vercel bot commented on 4305830 Jun 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

convo – ./

convo-git-main-convo.vercel.app
convo-convo.vercel.app
convo-sooty.vercel.app

Please sign in to comment.