Hello! I am using the boiler plate dex code from Moralis github, and whenever I try using the line âawait Moralis.Plugins.oneInch.getSupportedTokensâ. I have tried installing and uninstalling the 1Inch plugin from my server, both cause the same error. I will post part of my code (top of js file). Thank you so much!
const serverUrl = "https://XYZ;
const appId = "ABC";
Moralis.start({ serverUrl, appId });
async function init(){
//await Moralis.initPulgins();
await Moralis.enable();
await listAvailableTokens();
}
async function listAvailableTokens(){
const result = await Moralis.Plugins.oneInch.getSupportedTokens({
chain: 'eth',
});
const tokens = result.tokens;
let parent = document.getElementById("token_list");
for( const address in tokens){
let token = tokens[address];
let div = document.createElement("div");
div.className = "token_row";
let html = `
<img class="token_list_img" src="${token.logoURI}">
<span class="token_list_text">${token.symbol}</span>
`
div.innerHTML = html;
parent.appendChild(div);
}
}