Moralis self hosted server with vanilla js

@johnversus do we need to update code here

  async function checkToken(...args) {
    if (token_address && token_address.length == 42) {
      token_loading = true;
      token_error = false;
      await checkTokenAddress(token_address)
        .then(async (exists) => {
          if (exists) {
            token_loading = false;
            token_already_used = true;
            setTimeout(() => {
              token_already_used = false;
            }, 3000);
          } else {
            try {
              token_already_used = false;
              const metadata = await getTokenMetadata(token_address, chainId);
              token_metadata = metadata[0];

              token_loading = false;
            } catch (error) {
              console.log(error)
              token_loading = false;
              token_error = true;
            }
          }
        })
        .catch((error) => {
          // console.log("Error occurred while checking token address: ", error);
        });
    } else {
      token_metadata = null;
    }
  }

in catch block while console then it’s showing the error
catch (error) {
console.log(error)

if u can see in this part
const metadata = await getTokenMetadata(token_address, chainId);

Can you share the complete readable error trace here

@johnversus

Error: [C0005] Request contains unknown parameter: address. This operation supports the following parameters: chain, addresses
    at Function.<anonymous> (moralis.js:8150:23)
    at tryCatch (moralis.js:74956:40)
    at Generator.invoke [as _invoke] (moralis.js:75187:22)
    at Generator.throw (moralis.js:75012:21)
    at asyncGeneratorStep (moralis.js:31137:24)
    at _throw (moralis.js:31163:9)

No other details apart from this? :sweat_smile: Do you see any logs on the server console?

If we know how to reproduce this error then it will be possible to debug further.

@johnversus could u pls connect in meet?
it’s a request

Send me a dm on discord at johnversus. We can schedule from there. :raised_hands:

@johnversus i have send u a message in discord
my user name is threeayush

should i send u meet link in discord?

1 Like