Ethers Version
6.16.0
Search Terms
No response
Describe the Problem
sendTransaction will error reson: invalid value for value.nonce (invalid numeric string: Cannot convert undefined to a BigInt (argument="value", value="undefined", code=INVALID_ARGUMENT, version=6.16.0))
Code Snippet
try {
const provider = new ethers.BrowserProvider(window.ethereum);
const signer = await provider.getSigner();
const tx = await signer.sendTransaction({
to: address,
value: amountToPay,
});
const receipt = await tx.wait();
egf.Logger.log(
`transaction hash: ${tx.hash}, block number: ${receipt.blockNumber}`,
);
} catch (error) {
console.error('pay transaction error:', error);
}
Contract ABI
Errors
invalid value for value.nonce (invalid numeric string: Cannot convert undefined to a BigInt (argument="value", value="undefined", code=INVALID_ARGUMENT, version=6.16.0))
Environment
No response
Environment (Other)
No response
Ethers Version
6.16.0
Search Terms
No response
Describe the Problem
sendTransaction will error reson: invalid value for value.nonce (invalid numeric string: Cannot convert undefined to a BigInt (argument="value", value="undefined", code=INVALID_ARGUMENT, version=6.16.0))
Code Snippet
try { const provider = new ethers.BrowserProvider(window.ethereum); const signer = await provider.getSigner(); const tx = await signer.sendTransaction({ to: address, value: amountToPay, }); const receipt = await tx.wait(); egf.Logger.log( `transaction hash: ${tx.hash}, block number: ${receipt.blockNumber}`, ); } catch (error) { console.error('pay transaction error:', error); }Contract ABI
Errors
Environment
No response
Environment (Other)
No response