Oh I posted a pic of my current Moralis SDK above. Here you go! This came from my package.json file
Plugins
are not available currently from the react library. You can import āmoralisā itself and use his Plugins
functionality
But Plugins
support for the react will be added in the coming days.
Thanks YooMoo, I seem to be getting an issue still even when importing straight from Moralis instead of react-moralis where the enable and initPlugins properties are not found.
You need to import it this way: import { Moralis } from "moralis"
What you get if you run Moralis.CoreManager.get("VERSION")
? It should show you current Moralis SDK version that you have.
Do you get only a warning or an error on execution for Moralis.enable and Moralis.initPlugins?
I just ran the code and itās the same version that was in my package.json, 0.0.45
After updating moralis today Iāve started experiencing other issues. When I call authenticate with wallet provider set to wallet connect, it no longer works. Metamask authenticate still works. It has been working for the last month and after updating npm moralis and npm react moralis today it stopped working. No errors in console, itās like nothing happens?
Please share your repo, itās difficult to debug screens.
Iāve tested yesterday importing import { Moralis } from "moralis"
and .Plugins
work with it correctly
Regarding walletconnect
, make sure you have isntalled it npm install @walletconnect/web3-provider
Sure thing! The github repo is : https://github.com/solidity-alchemist/Eviral
The authentication calls are in the component Navbar.js
Thank you! Weird that it has been working for the last month, the suddenly stopped but after I installed npm install @walletconnect/web3-provider, walletconnect works again!
However, Moralis.Plugins, Moralis.enable, Moralis.initPlugins are not recognized. Iāve tried importing Moralis from moralis and through react-moralis.
Hopefully we find what is occurring
It used to be installed automatically, but about a month ago the SDK stopped doing it.
Make sure you donāt import Moralis twice
import { useMoralis } from "react-moralis";
import { Moralis } from "moralis";
function Navbar() {
const { isInitialized} = useMoralis();
useEffect(() => {
if (isInitialized) {
Moralis.initPlugins();
const pluginList = Moralis.Plugins;
console.log(pluginList);
}
}, [isInitialized]);
}
I suggest you to use new syntax. For calling web3API from react you need to use useMoralisWeb3Api()
Instead of Moralis.Web3.getERC20()
Thank you for these resources. Itās almost 3am here so Ill read through tomorrow and get back to you! Can I ask how you made this appear in the console? Thanks again and goodnight
const pluginList = Moralis.Plugins;
console.log(pluginList);
Something strange is going on lol. I used the same code and 1inch didnāt return for me despite that it did for you.
function ListPlugins() {
const pluginList = Moralis.Plugins;
const list = () => console.log(pluginList);
return (
<div>
<button onClick={list}>List</button>
</div>
)
}
Have you initilized plugins?