Skip to content

[bug] Integrate TRON chain support for Web3Modal #1527

@0xBeycan

Description

@0xBeycan

Link to minimal reproducible example

It's not necessary

Summary

Hello, I use WalletConnect in my project for both Tron and EVM-based networks. In doing this, I use the following package provided by Tron.

package

However, since they both try to define the same "web components", I get the following error.

DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "w3m-button" has already been used with this registry

Therefore, I think you can solve this problem by adding a small condition to the places where these components are defined.

List of related npm package versions

"@wagmi/core": "^1.4.7",
"@web3modal/wagmi": "^3.3.2",
"viem": "^1.19.11"

Usingi n Tron WalletConnect adapter

"@tronweb3/walletconnect-tron": "2.0.0",
"@wagmi/core": "^1.1.0",
"@walletconnect/sign-client": "^2.1.4",
"@walletconnect/types": "^2.1.4",
"@web3modal/ethereum": "^2.4.2",
"viem": "^0.3.50",

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions