I am trying to fetch the balance of 2 real life ETH wallets on Binance website but the balance always comes back as 0. When trying to fetch from a Ropsten chain that i created with 0.15 ETH, i successfully get that value in my application. Web3 is enabled and all so thatās not the problemā¦
This works when Iām connected to the Ropsten chain on MetaMask:
const Web3Api = useMoralisWeb3Api();
const getBalance = async () => {
const balance = await Web3Api.account.getNativeBalance({
chain: "ropsten",
address: "my_metamask_wallet",
});
console.log(balance); // I get my 0.15 ETH
};
However calling this function with an address from binance with more than 0 ETH, it doesnāt work:
const getBalance = async () => {
const balance = await Web3Api.account.getNativeBalance({
chain: "eth",
address: "my_binance_wallet_address",
});
console.log(balance); // I get 0 ETH, not true...
};
I also tried with a polygon wallet and it still doesnt workā¦
Some info about my project:
- Itās using react-moralis and everything is plugged in correctly
- Iām using moralis in a NextJS project
Does the Web3API not work with wallets outside of MetaMask? Iām very confusedā¦
Thank you!