web3.currentProvider.isMetaMask is not working as well.
why NFT Assets not appearing in react native application⌠after connected my metamask test network wallet in my application⌠its always loading onlyâŚ
~ Canât find variable: localStorage ~
Even useMoralisQuery is not working properly. Can you help this?
I would revert back to the default Moralis and react-moralis versions, that would probably introduce many more issues like this one. To reiterate, this boilerplate is in alpha and not production ready so updating packages will likely break things.
Not working properly, I connected with Polygon Testnet Mumbai, but chainId gives me 0x1 all the time.
Possibly 0x1 has been hard set, try changing or removing the chainId in this provider to see if it changes the chainId
from useMoralisDapp.
Where did you try using chainId
(which file)? Iâm not able to get any valid chainId when logged in.
This may be related to the issue the user is having above where the chain ID does not seem to be set properly.
can you please explain it brieflyâŚ
can you please explain it briefly.
Hey i am having an issue with the react-native boilerplate. On some devices the Login with wallet is working. But on some ex: ios i get the following error:
Non ethereum enabled browser
and the Qr modal is shown.
Is that an error or a warning? If the app still works then it should be fine - that message would be expected on an iOS device.
The thing is that the wallet connect modal is not showing⌠so i canât sign in to the app.
Only the QR is showing and in some Devices even the QR is not showing,
Can you post a screenshot of this QR, I thought you were referring to the WalletConnect modalâs QR code. Which devices does the modal (e.g. with the Connect button) not show? You can check your console for any other errors.
Donât know what my issue is at this point. Is it because i"m using js with jsx or my dapp is not connected to moralis token_img wonât display
Where is this code/template from? It doesnât seem to be from the react-native boilerplate.
If this is for the ethereum-boilerplate, then you can post in this thread.
It is the wallet connect QR modal. The thing is that i want to log via walletConnect with the installled wallets on my phone. But the Button (Login with wallet) doesnât open the wallets, or the WalletConnect Modal.
Which device are you using where the button doesnât do anything? For Android you can get wallets connected (without WalletConnect) if you make this change.
In ios the button only pops the QR code. I donât need the QR i only need the wallet connect options.
I will make those changes so i can fix the problems on some android devices where the button doesnât do anything (neither the QR popâs or the wallet connect modal).
hai @alex , i have a doubt,
the file path:ethereum-react-native-boilerplate\frontend\providers\MoralisDappProvider\MoralisDappProvider.js
How do I get ChainID dynamically?
I put a static chain id and itâs fine⌠If I put chianId: chainId it shows only for loadingâŚ
(<MoralisDappContext.Provider value={{walletAddress, chianId: chainId}}>)
hereâs my code:
import React, {useEffect, useMemo, useState} from âreactâ;
import {useMoralis} from âreact-moralisâ;
import MoralisDappContext from â./contextâ;
//import Web3 from âweb3â; // Only when using npm/yarn
function MoralisDappProvider({children}) {
const {web3, Moralis, user} = useMoralis();
const [walletAddress, setWalletAddress] = useState();
const [chainId, setChainId] = useState();
useEffect(() => {
Moralis.onChainChanged(function (chain) {
setChainId(chain);
});
Moralis.onAccountsChanged(function (address) {
setWalletAddress(address[0]);
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => setChainId(web3.givenProvider?.chainId));
useMemo(
() =>
setWalletAddress(
web3.givenProvider?.selectedAddress || user?.get(âethAddressâ),
),
[web3, user],
);
return (
<MoralisDappContext.Provider value={{walletAddress, chainId:â0x3â}}>
{children}
</MoralisDappContext.Provider>
);
}
function useMoralisDapp() {
const context = React.useContext(MoralisDappContext);
if (context === undefined) {
throw new Error(âuseMoralisDapp must be used within a MoralisDappProviderâ);
}
return context;
}
export {MoralisDappProvider, useMoralisDapp};
Hello can you read this on how to post code on this forum.
Iâm not sure, maybe you canât get the chainId with a deep link connection. If you use WalletConnect for the wallet connection, you should be able to get the chainId separately.