I'm trying to send a transaction via bsc
using WalletConnect
and web3
This is the connection code
const provider = new WalletConnectProvider({
rpc: {
1: "https://bsc-dataseed.binance.org/",
2: "https://bsc-dataseed1.defibit.io/",
3: "https://bsc-dataseed1.ninicoin.io/",
// ...
},
});
async function() {
await provider.enable();
// Get Accounts
web3.eth.getAccounts((error, accounts) => {
if (error) alert(error)
this.account = accounts[0]
});
}
And this is the cransaction call
web3.eth.sendTransaction({
to: '0x...',
from: this.account,
value: 1000000000000, //test value
}, ((error, hash) => {
if (error) alert(error)
else console.log(hash)
}));
The problem is that on my trust wallet the transaction is on the ETH blockchain, even if I can read my bsc
token balance correctly.
Any ideas?