-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Describe the bug
Because w3m_chains_presets.dart does not have the testnet network chains i was referred in a comment to implement it as a custom-chain:
// See https://docs.walletconnect.com/web3modal/flutter/custom-chains
W3MChainInfo sepoliaTestnet = W3MChainInfo(
chainName: 'Sepolia Test Network',
namespace: 'eip155:11155111',
chainId: '11155111',
tokenName: 'SETH',
requiredNamespaces: {
'eip155': const RequiredNamespace(
methods: EthUtil.ethRequiredMethods,
chains: ['eip155:11155111'],
events: EthUtil.ethEvents,
),
},
optionalNamespaces: {
'eip155': const RequiredNamespace(
methods: EthUtil.ethOptionalMethods,
chains: ['eip155:11155111'],
events: [],
),
},
rpcUrl: 'https://rpc.sepolia.org',
blockExplorer: W3MBlockExplorer(
name: 'Sepolia Etherscan',
url: 'https://sepolia.etherscan.io',
),
);
W3MChainPresets.chains.putIfAbsent(
'11155111',
() => sepoliaTestnet);
But after after adding the W3MChainInfo() and run the flutter sample app. I can select the Sepolia Testnet, and i can scan the QR code, it also connects to my Metamask wallet, but when i want to execute one of the methods i receive an error
I/flutter (26749): snapshot: AsyncSnapshot<dynamic>(ConnectionState.done, null, WalletConnectError(code: 5100, message: Unsupported chains. The chain eip155:1 is not supported, data: null), #0 SignApiValidatorUtils.isValidNamespacesChainId (package:walletconnect_flutter_v2/apis/sign_api/utils/sign_api_validator_utils.dart:127:7)
I/flutter (26749): #1 SignEngine._isValidRequest (package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart:1641:27)
I/flutter (26749): <asynchronous suspension>
I/flutter (26749): #2 SignEngine.request (package:walletconnect_flutter_v2/apis/sign_api/sign_engine.dart:473:5)
I/flutter (26749): <asynchronous suspension>
I/flutter (26749): #3 Web3App.request (package:walletconnect_flutter_v2/apis/web3app/web3app.dart:204:14)
I/flutter (26749): <asynchronous suspension>
I/flutter (26749): #4 EIP155.ethSendTransaction (package:walletconnect_flutter_dapp/utils/crypto/eip155.dart:235:12)
I/flutter (26749): <asynchronous suspension>
I/flutter (26749): )
Is this still unsupported in web3modal_flutter @ 3.0.0-beta06 ? or am i implementing it wrong?
Metadata
Metadata
Assignees
Labels
No labels