(web3, enableWeb3, isWeb3Enabled} = useMoralis() is not exposing utils…
web3.utils.toAscii(metadataurl_) is not working
Cannot read properties of undefined (reading ‘toAscii’)
(web3, enableWeb3, isWeb3Enabled} = useMoralis() is not exposing utils…
web3.utils.toAscii(metadataurl_) is not working
Cannot read properties of undefined (reading ‘toAscii’)
The web3 from there seemed to be null as moralis uses ethersjs.
To get that to work, you can install web3 yarn add web3
And then create an instance
import { useMoralis } from "react-moralis";
import Web3 from "web3";
const { Moralis } = useMoralis();
const web3 = new Web3(Moralis.provider);
This way web3.utils.toAscii(metadataurl_)
ought to work