-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need chains array in Namespace class #268
Comments
Hello @muhammad-hassan-shakeel! I didn't understand your concern but for session proposals these are the models: https://github.com/WalletConnect/WalletConnectFlutterV2/blob/master/lib/apis/sign_api/models/proposal_models.dart Docs: https://docs.walletconnect.com/web3wallet/wallet-usage#session-approval |
approveSession method takes namespaces argument of Namespace type. Namespace type has three attributes accounts, events and methods. On unity end, namespace object looks like this:
the unity guys are looking for "chains" list from flutter side. how can I send them the chains list? |
An account is just the union of the chainId and the address, so for instance, void _onSessionProposal(SessionProposalEvent? args) async {
final accounts = args?.params.generatedNamespaces?['eip155']?.accounts;
final allChains = NamespaceUtils.getChainsFromAccounts(accounts ?? []);
debugPrint('All eip155 chains requested: $allChains');
} |
is there a way for me to add "chains" key in the map? with information related to chains only? excluding the address part |
Hi @quetool The code is here: https://github.com/wevm/wagmi/blob/c403563be5dd3ab36d8582e69071ce87294468c2/packages/connectors/src/walletConnect.ts#L261 |
Hello @hoangbtmrk , you should open your issue under web repository https://github.com/WalletConnect/web3modal, this is the Flutter one. |
This is the Namespace class, we are developing some application where I need to connect with the Unity app of ours via WalletConnect. Unity team is looking for chains list in Namespace but unfortunately it doesn't have it. Can you please tell me what can I do on flutter end to send that to them at the time of Session approval?
The text was updated successfully, but these errors were encountered: