Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[bug] Integrate TRON chain support for Web3Modal #1527

Closed
BeycanDeveloper opened this issue Dec 2, 2023 · 13 comments
Closed

[bug] Integrate TRON chain support for Web3Modal #1527

BeycanDeveloper opened this issue Dec 2, 2023 · 13 comments

Comments

@BeycanDeveloper
Copy link

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",

@BeycanDeveloper BeycanDeveloper added bug Something isn't working needs review labels Dec 2, 2023
@BeycanDeveloper BeycanDeveloper changed the title [bug] [bug] Condition before defining web components Dec 2, 2023
@glitch-txs
Copy link
Contributor

This is not recommended as you might end up with localStorage issues. We're planning to add support for more chains in the future though.

@BeycanDeveloper
Copy link
Author

I understand that I have moved the codes in the tron package to a separate area right now and I will try to replace them with WalletConnect 1.

@glitch-txs glitch-txs changed the title [bug] Condition before defining web components [bug] Integrate TRON chain support for Web3Modal Dec 2, 2023
@glitch-txs glitch-txs added feature-request and removed bug Something isn't working needs review labels Dec 2, 2023
@way2ex
Copy link

way2ex commented Jan 22, 2024

@glitch-txs Hi~currently, the package @web3modal/ethers and @web3modal/wagmi can both only be used for eip155 namespace. Is there any plan to support other namespace such as tron:0x94a9059e namespace ? Thank you!

@glitch-txs
Copy link
Contributor

Hi we're working a Solana integration and are planning to add Tron in the future as well, there's no current support for other namespaces atm

@BeycanDeveloper
Copy link
Author

@glitch-txs how about Bitcoin and maybe for Xverse wallet? WalletConnect really needed for Bitcoin. Also, i want create a open source project MultipleChain i will write with TS can we talk with you about of structure?

@glitch-txs
Copy link
Contributor

could you open a separated issue for each of those chains?

@BeycanDeveloper
Copy link
Author

@glitch-txs yes i can open issue for Bitcoin & Xverse wallet support. But i want talk with you about of a project struct. That's why i contacted with you on Twitter can we talk there?

@glitch-txs
Copy link
Contributor

happy to take PRs @BeycanDeveloper but I think we are a bit early to support multi chain in Web3Modal

@BeycanDeveloper
Copy link
Author

@glitch-txs No it’s not for w3m this is separate open source project it’s my project. I just want talk with you about of this.

@way2ex
Copy link

way2ex commented Jan 23, 2024

Hi we're working a Solana integration and are planning to add Tron in the future as well, there's no current support for other namespaces atm

Thanks a lot for your great work!

@Muzided
Copy link

Muzided commented Mar 13, 2024

i am facing the same issue in my project i have added web3 modal for USDT transfers for multiple mainnet evm chains but for tron i am using "@tronweb3/walletconnect-tron": "^2.0.0", library for trust wallet and i am getting the same issue how can i differentiate the web component

@hhun
Copy link

hhun commented May 6, 2024

Hi we're working a Solana integration and are planning to add Tron in the future as well, there's no current support for other namespaces atm

@glitch-txs
TRON now has a high market share in the cryptocurrency world, at least higher than Solana. It is recommended to increase support for the TRON network.

@BeycanDeveloper
Copy link
Author

BeycanDeveloper commented May 6, 2024

@hhun you can use legacy modal version with this package: https://github.com/MultipleChain/tron-walletconnect

@reown-com reown-com locked and limited conversation to collaborators Jun 16, 2024
@glitch-txs glitch-txs converted this issue into discussion #2427 Jun 16, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

5 participants