Chat Open AI

AI helped debug my code! 🤯

My code was returning a BigNumber overflow error and I asked Chat Open AI to help debug it. The chat bot returned two solutions which I copied and pasted into the code and one of them worked perfectly!

Here’s the final working code:

const BigNumber = require('bignumber.js');
const bigNum = new BigNumber(data);
const str = bigNum.toString();
const etherVal = ethers.utils.formatEther(str);
setTotalRaised(etherVal);