Skip to content

Leason 7: gas amount not matching when run test "withdraw with multiple funders" ! #5030

Answered by paulcoffee85
N-dcool asked this question in Q&A
Discussion options

You must be logged in to vote

Can you drop link to repo?

Missing await :

it("allows us to withdraw with multiple funders", async () => {
            const accounts = await ethers.getSigners();
            //arrange:
            for (var i = 1; i < 6; i++) {
                const fundMeConnectedContract = await fundMe.connect(
                    accounts[i]
                );
  THIS LINE===>>   _await_  fundMeConnectedContract.fund({ value: sendValue }); <==== THIS LINE
            }
            const startingFundMeBalance = await fundMe.provider.getBalance(
                fundMe.address

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by N-dcool
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants