adrianhajdin / project_crowdfunding

With a stunning design, connected to the blockchain, metamask pairing, interaction with smart contracts, sending Ethereum through the blockchain network, and writing solidity code.
https://jsmastery.pro
693 stars 375 forks source link

createCampaign() require statement #22

Closed deliriant closed 9 months ago

deliriant commented 1 year ago

The condition of the require statement is flipped (deadline should be greater than current timestamp) and it is checking the value of a variable that hasn't been assigned a value yet (0), which which will always be less than the current timestamp.

I have flipped the inequality and used the value passed to the function.