hello everyone again
i have a new error that i cant figure out. im still in the dex javascript tutorial. i get the following error when i run my code
Uncaught (in promise) ReferenceError: object is not defined
gettickerdata http://127.0.0.1:5500/dex.js:52
this is my current code
// connect to Moralis server
const serverUrl = "******************";
const appId = "***************";
Moralis.start({ serverUrl, appId });
// add from here down
async function login() {
let user = Moralis.User.current();
if (!user) {
user = await Moralis.authenticate();
}
console.log("logged in user:", user);
}
async function getStats()
{
const balances = await Moralis.Web3API.account.getTokenBalances({chain:'polygon'});
console.log (balances);
}
async function logOut() {
await Moralis.User.logOut();
console.log("logged out");
}
document.getElementById("btn-login").onclick = login;
document.getElementById("btn-logout").onclick = logOut;
async function getTop10tokens() {
const response = await fetch (' https://api.coinpaprika.com/v1/coins ');
const tokens = await response.json();
return tokens.filter( token => token.rank <= 10).map(token => token.symbol);
}
async function gettickerdata() {
const response = await fetch ('https://api.1inch.exchange/v3.0/137/tokens');
const tokens = await response.json ();
const tokenlist = object.values(tokens.tokens);
return tokenlist. filter(token => tickerlist.includes(token.symbol));
}
getTop10tokens()
.then(gettickerdata)
.then(console.log);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Moralis SDK code -->
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script src="https://unpkg.com/moralis@latest/dist/moralis.js"></script>
<title>Moralis Dex </title>
</head>
<body>
<button id="btn-login">Moralis Login</button>
<button id="btn-logout">Logout</button>
<script src="./dex.js"></script>
</body>
</html>
does anyone have any suggestions on how too fix this? im following the video exactly and im not sure what im doing wrong