Yes, you have to use:
Moralis.start({ serverUrl: “https://a1zxiyoi7jle.moralishost.com:2053/server”, appId: “LtCAPag9Kl1f9oOtxJ5jr7xV9KbuBJbSklemDqvK” });
Yes, you have to use:
Moralis.start({ serverUrl: “https://a1zxiyoi7jle.moralishost.com:2053/server”, appId: “LtCAPag9Kl1f9oOtxJ5jr7xV9KbuBJbSklemDqvK” });
perfect, thank you team. it worked.
the below function does not work. i am receiving below error:
Uncaught (in promise) {code: 141, error: ‘Error: required param address not provided’}
https://a1zxiyoi7jle.moralishost.com:2053/server/functions/getNativeBalance
does this relate to the above problem/change?
function:
getBalances = async() =>{
console.log(‘Get Balances click’);
const rinkebyBalance = await Moralis.Web3API.account.getNativeBalance({ chain: “rinkeby” });
yes, it is also related to that change, we will make a fix soon for this
When will this issue be resolved?
I would expected to be fixed today, I’ll reply here when is fixed
Thanks buddy, really appreciate your help
Back and better the 3 depreciated warnings are now gone!
Thank you Moralis team!
thank you @cryptokid but for some reason i am still receiving the below erros if i call the function. not sure if it is me or something else.
Failed to load resource: the server responded with a status of 400 ()
Uncaught (in promise)
Object
code: 141
error: “Error: required param address not provided”
[[Prototype]]: Object
i did a debug, i think the below is still now working:
const ethBalance = await Moralis.Web3API.account.getNativeBalance()
what you see if you run this in browser console: Moralis.CoreManager.get("VERSION")
?
you should see: 'js0.0.87'
i get the below version:
‘js0.0.87’
it looks like you also have to use something like window.web3 = await Moralis.enable();
yes, now it works. thank you
Hello, me too since today it does not work.
I changed this in my 2 .js files
I also checked my version in the console and I have ‘js0.0.87’
But I have his mistakes:
Access to XMLHttpRequest at 'https://xsmb9wqekxnl.moralishost.com:2053/server%20/functions/getTokenPrice' from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
moralis.js:27851 POST https://xsmb9wqekxnl.moralishost.com:2053/server%20/functions/getTokenPrice net::ERR_FAILED
dispatchXhrRequest @ moralis.js:27851
xhrAdapter @ moralis.js:27687
dispatchRequest @ moralis.js:28245
Promise.then (async)
request @ moralis.js:28061
Axios.<computed> @ moralis.js:28087
wrap @ moralis.js:28567
(anonymous) @ moralis.js:6347
tryCatch @ moralis.js:26918
invoke @ moralis.js:27148
(anonymous) @ moralis.js:26973
asyncGeneratorStep @ moralis.js:26427
_next @ moralis.js:26449
(anonymous) @ moralis.js:26456
Wrapper @ moralis.js:31028
(anonymous) @ moralis.js:26445
(anonymous) @ moralis.js:6381
(anonymous) @ moralis.js:6770
tryCatch @ moralis.js:26918
invoke @ moralis.js:27148
(anonymous) @ moralis.js:26973
asyncGeneratorStep @ moralis.js:26427
_next @ moralis.js:26449
(anonymous) @ moralis.js:26456
Wrapper @ moralis.js:31028
(anonymous) @ moralis.js:26445
(anonymous) @ moralis.js:6781
getPrice @ main.js:3
(anonymous) @ VM130:1
moralis.js:28189 Uncaught (in promise) Error: Network Error
at createError (moralis.js:28189)
at XMLHttpRequest.handleError (moralis.js:27758)
createError @ moralis.js:28189
handleError @ moralis.js:27758
async function (async)
getPrice @ main.js:3
(anonymous) @ VM130:1
moralis.js:27851 XHR failed loading: POST "https://xsmb9wqekxnl.moralishost.com:2053/server%20/functions/getTokenPrice".
It looks like you have a space at the end of your server_url
Ok thank you very much and excuse me, I’m going to go and hide.
You can use:
web3 = await Moralis.enableWeb3()
address = (await web3.eth.getAccounts())[0]