Hi guys, i have sample code
const appId = "....";
const serverUrl = "....";
Moralis.initialize(appId);
Moralis.serverURL = serverUrl;
async function test() {
let user = Moralis.User.current();
var options = {
'address' : user.get('ethAddress'),
'chain' : '0x61'
}
balance = await Moralis.Web3API.account.getNativeBalance(options);
console.log(balance)
}
i had get a error ''Web3Api not initialized, run Moralis.start() first", but i change my code
Moralis.initialize(appId);
Moralis.serverURL = serverUrl;
with
Moralis.start({ serverUrl, appId });
itβs run, I donβt know why what is the difference between them? Moralis.initialize is deprecated? thank for help