Beginner FriendlyFoundryDeFi
100 EXP
View results
Submission Details
Severity: low
Invalid

Inconsistent Code On Equality Check

Summary

There is an inconsistency within the code on getConfig.js related to equality check.

Vulnerability Details

The code on line 4-7 on getConfig.js has an inconsistent code.

if (process.env.ENVIRONMENT === "dev") {
rpcUrl = process.env.LOCALHOST_RPC_URL;
steakingAddress = process.env.STEAKING_CONTRACT_ADDRESS_LOCALHOST;
} else if (process.env.ENVIRONMENT == "production") {

The first if branch uses strict equality check (===) while the second if uses loose equality check (==).

Impact

Not much.

Tools Used

Manual review.

Recommendations

Consider using consistent strict equality check on both if branches.

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.