I want to send big value (10000000) for example to other wallet but i have error like this:
UnhandledPromiseRejectionWarning: Error: Error: [number-to-bn] while converting number 3.0244e+22 to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "3.0244e+22"
My code:
const myAddress = web3.eth.defaultAccount;
const gasPrice = new BN(await web3.eth.getGasPrice()).mul(new BN(toSend));
const gasLimit = 6721900;
const value = toSend* 1e18;
const from = web3.eth.defaultAccount;
const to = wallet_id;