The reason is that you either passed an argument of wrong type and not BN or a bracket mistake
This is correct:
const ethStateBeforeInvesting = new web3.utils.BN(await web3.eth.getBalance(investor)) const working = ethStateBeforeInvesting.sub(ether("1").sub(new web3.utils.BN("1000")))
Schreibe einen Kommentar