Is the Seplia testnet network supported by TrustWallet? I keep getting the following errors when attempting to send a mint transaction to a Sepolia ERC20 contract. It works fine with Metamask.
Invalid JSON RPC response: {}
Cannot read properties of null (reading 'network')
- In “Developer Settings” > “Enable testnets” is set to ON position
I’ve also tried connecting to Sepolia on OpenSea and Uniswap using both the desktop extension on Windows and the mobile app on iOS. The mobile iOS app was unable to connect to Sepolia at all. On the desktop extension I got the same error messages above on Uniswap as on the test ERC20 contract.
The website I’m testing with is connecting via the latest versions of RainbowKit (1.1.0) and Wagmi (1.4.5) and is passing in a valid WalletConnect v2 key.
Wagmi, RainbowKit Config
import { connectorsForWallets } from "@rainbow-me/rainbowkit";
// custom wallet list
import {
argentWallet,
braveWallet,
coinbaseWallet,
ledgerWallet,
metaMaskWallet,
rainbowWallet,
trustWallet,
walletConnectWallet,
} from "@rainbow-me/rainbowkit/wallets";
import { configureChains, createConfig } from "wagmi";
import { sepolia } from "wagmi/chains";
import { jsonRpcProvider } from "wagmi/providers/jsonRpc";
// import { alchemyProvider } from "wagmi/providers/alchemy";
import { publicProvider } from "wagmi/providers/public";
import { env } from "../../env.mjs";
import { getSupportedChains } from "./supportedChains";
export const { supportedChains, requiredChains } = getSupportedChains();
const { chains, publicClient } = configureChains(requiredChains, [
jsonRpcProvider({
rpc: (chain) => {
if (chain.id === sepolia.id)
return {
http: `https://eth-sepolia.g.alchemy.com/v2/${env.NEXT_PUBLIC_ALCHEMY_ID}`,
};
if (!chain.rpcUrls.alchemy) return null;
return {
http: `${chain.rpcUrls.alchemy.http[0]}/${env.NEXT_PUBLIC_ALCHEMY_ID}`,
};
},
}),
publicProvider(),
]);
const projectId = env.NEXT_PUBLIC_WALLET_CONNECT_ID;
const connectors = connectorsForWallets([
{
groupName: "Recommended",
wallets: [
rainbowWallet({ projectId, chains }),
metaMaskWallet({ projectId, chains }),
ledgerWallet({ projectId, chains }),
],
},
{
groupName: "Others",
wallets: [
argentWallet({ projectId, chains }),
braveWallet({ chains: chains, shimDisconnect: true }),
coinbaseWallet({ chains, appName: "Marketplace" }),
trustWallet({
projectId,
chains: chains,
walletConnectVersion: "2",
shimDisconnect: true,
}),
walletConnectWallet({ projectId, chains }),
],
},
]);
export const wagmiClient = createConfig({
autoConnect: true,
connectors,
publicClient,
});
```ts