JS Dex // Metamask Balances

Hi, I’m working on the Metamask Balances video of the JS Dex course. I have typed in the code as you instructed in the video and in the console I receive this error after logging in and attempting to fetch the balances (my MATIC wallet is empty). What does it seem like is the problem here? How can it be fixed?

dex.js:18 logged in user: ParseUser {id: 'P3JzpY99wWfQLxhVbVHateI4', _objCount: 2, className: '_User'}
**moralis.js:7935 Uncaught (in promise) Error: Web3Api not initialized, run Moralis.start() first**
    at Function.<anonymous> (moralis.js:7935:23)
    at tryCatch (moralis.js:73982:40)
    at Generator.invoke [as _invoke] (moralis.js:74213:22)
    at Generator.next (moralis.js:74038:21)
    at asyncGeneratorStep (moralis.js:30574:24)
    at _next (moralis.js:30596:9)
    at moralis.js:30603:7
    at new Promise (<anonymous>)
    at new Wrapper (moralis.js:57169:24)
    at Function.<anonymous> (moralis.js:30592:12)
(anonymous) @ moralis.js:7935
tryCatch @ moralis.js:73982
invoke @ moralis.js:74213
(anonymous) @ moralis.js:74038
asyncGeneratorStep @ moralis.js:30574
_next @ moralis.js:30596
(anonymous) @ moralis.js:30603
Wrapper @ moralis.js:57169
(anonymous) @ moralis.js:30592
(anonymous) @ moralis.js:7978
(anonymous) @ moralis.js:7880
tryCatch @ moralis.js:73982
invoke @ moralis.js:74213
(anonymous) @ moralis.js:74038
asyncGeneratorStep @ moralis.js:30574
_next @ moralis.js:30596
(anonymous) @ moralis.js:30603
Wrapper @ moralis.js:57169
(anonymous) @ moralis.js:30592
(anonymous) @ moralis.js:7917
(anonymous) @ moralis.js:8295
tryCatch @ moralis.js:73982
invoke @ moralis.js:74213
(anonymous) @ moralis.js:74038
asyncGeneratorStep @ moralis.js:30574
_next @ moralis.js:30596
(anonymous) @ moralis.js:30603
Wrapper @ moralis.js:57169
(anonymous) @ moralis.js:30592
(anonymous) @ moralis.js:8314
getStats @ dex.js:23
login @ dex.js:19
await in login (async)
login @ dex.js:19
Show 2 more frames

Hey @limitlessandrew, hope you are well.

Please share your dex.js file in the following way:

Carlos Z

Ok, I posted my dex.js and index.html files in the Bootstrap MIME Error post I just made. @thecil if you can help me understand what I’m doing wrong for the Bootstrap implementation, then I can finish up the first Moralis training I purchased and move on to the next at the premium level if I get through this one soon! Blessings, Andrew

1 Like

posted the solution in the other topic where you share this 2 files, check it out :nerd_face:

Carlos Z