Closed Vesloo closed 2 years ago
Yes I faced the similar issue. Don't worry about it. There are some mistakes in staging tests. I already fixed that and created a pull request for typescript branch. You can check https://github.com/mehedi-iitdu/hardhat-fund-me-fcc
Yes I faced the similar issue. Don't worry about it. There are some mistakes in staging tests. I already fixed that and created a pull request for typescript branch. You can check https://github.com/mehedi-iitdu/hardhat-fund-me-fcc
I've made both changes that you proposed: added Gas Limit parameter in the withdraw call and added the gas key in hardhat.config.
It worked! Thanks!
I copied the code from this repo (test/staging/FundMe.staging.test.js) but it doesn't work, this is the error I get:
AssertionError: expected '60000000000000000' to equal '0'
It looks like there is an issue with the endingFundMeBalance variable but I don't know what. Did someone has the same issue ?
It's likely because your fund transaction gets executed but withdraw transaction failed, so you end up having some ether in your fundMe contract, which is not equal to 0.
I fixed this issue by waiting for one block confirmation after executing the transaction
const fundTxResponse = await fundMe.fund({ value: sendValue });
await fundTxResponse.wait(1);
const withdrawTxResponse = await fundMe.withdraw();
await withdrawTxResponse.wait(1);
I copied the code from this repo (test/staging/FundMe.staging.test.js) but it doesn't work, this is the error I get:
It looks like there is an issue with the endingFundMeBalance variable but I don't know what. Did someone has the same issue ?