# Symbol Amount Action blank? moralis dex project help

the tokens are also undefined. so i guess i have more problems as well

<!DOCTYPE html>
<html lang="en">
    <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>
        <link rel="stylesheet" href="style.css">




    <button id="btn-login">Moralis Login</button>
    <button id="btn-buycrypto">Buy Crypto</button>
    <button id="btn-logout">Logout</button>




        <tbody class ="js-token-balances"></tbody>


    <form action="#" method="POST" class="exchange-form">
        <div class="form-row">


            <span class ="js-from-token"></span>
            <input type ="text" name="from-amount" class="js-from-amount" disabled  />

        <div class="js-amount-error error"></div>
        <div class="form-row">
            <button type="submit" class="js-submit" disabled > Get Qoute</button>
            <button class="js-cancel" disabled > Cancel</button>
        <div class="js-qoute-container"></div>

    <script src="./dex.js"></script>

    // connect to Moralis server

    const serverUrl = "https://hzgprsd3s1da.usemoralis.com:2053/server";
    const appId = "YwMvfUyGm50mRIrKsXsWCwlkPjQxji5zCuVNP3xe";
    Moralis.start({ serverUrl, appId });

        .then ( () => console.log ('plugins have been initialized ') );

    const $tokenBalanceTBody = document.querySelector('.js-token-balances');
    const $selectedToken =document.querySelector('js-from-token');
    const $amountInput= document.querySelector('.js-frorm-amount');

    //Converting  from wei  using custom function 
    const tokenValue = (value, decimals) => (decimals ? value / Math.pow(10, decimals): value);

   // 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",
    document.querySelector(".js-token-balances").innerHTML += balances
        (token, index) => `
        <td> ${index + 1}</td>
        <td> ${token.symbol}</td>
        <td> ${token.amount}</td>
        <td> ${Moralis.Units.FromWei(token.balance, token.decimals)}</td>

  async function swap (event) {
    $selectedToken.innerText = event.target.dataset.symbol;
    $selectedToken.dataset.address =  event.target.dataset.address;
    $selectedToken.dataset.decimals =  event.target.dataset.decimals;
    $selectedToken.dataset.max =  event.target.dataset.max;
    $amountInput.value = '';
    document.querySelector('.js-qoute.container').innerHTML = '';



for ( let $btn of  $tokenBalanceTBody.querySelectorAll('js-swap')) {


  async function buycrypto () {
    Moralis.Plugins.fiat.buy ();


  async function logOut() {
    await Moralis.User.logOut();
    console.log("logged out");

  document.getElementById("btn-login").onclick = login;
  document.getElementById("btn-buycrypto").onclick =buycrypto;
  document.getElementById("btn-logout").onclick = logOut;

  async function getTop10tokens() {
    const response = await fetch(" https://api.coinpaprika.com/v1/coins ");
    const tokens = await response.json();
    let result = tokens
      .filter((token) => token.rank <= 10)
      .map((token) => token.symbol);
    return result;
  async function gettickerdata(top10Tokens) {
    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) => top10Tokens.includes(token.symbol));
    .then((top10Tokens) => gettickerdata(top10Tokens))
.error {

    color: darkred;

this is everything ive done up too this point

please disregard my other questions. i actually had too add more too the code

thank you all for taking time too help me again i really do appreciate it