You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After connect using connect wallet I want to send eth to special account.
This is my code.
const signer = await provider.getSigner();
let acct2 = "0x3cdC610b00D4eB27009aB4E506241dBAd8666B50";
const address = await signer.getAddress()
const balance = await signer.getBalance()
let amount = 0.005;
if (signer) {
try {
const value = ethers.utils.parseEther(String(amount));
const hexString = value.toHexString();
const tx = await signer.sendTransaction({ to: acct2, value: hexString});
console.log(tx)
} catch ( error ) {
console.log('tx',error)
}
}
The text was updated successfully, but these errors were encountered:
After connect using connect wallet I want to send eth to special account.
This is my code.
const signer = await provider.getSigner();
let acct2 = "0x3cdC610b00D4eB27009aB4E506241dBAd8666B50";
const address = await signer.getAddress()
const balance = await signer.getBalance()
let amount = 0.005;
if (signer) {
try {
const value = ethers.utils.parseEther(String(amount));
const hexString = value.toHexString();
const tx = await signer.sendTransaction({ to: acct2, value: hexString});
console.log(tx)
} catch ( error ) {
console.log('tx',error)
}
}
The text was updated successfully, but these errors were encountered: