Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown error occurred walletconnect use wallet on only trust wallet #189

Open
SmartDev-0205 opened this issue Feb 16, 2022 · 0 comments
Open

Comments

@SmartDev-0205
Copy link

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)
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant