Concordium / concordium-dapp-libraries

A coherent set of building blocks for making it as easy as possible for developers to build web-based dApps.
Apache License 2.0
7 stars 5 forks source link

Fix circular dependency #70

Closed DOBEN closed 5 months ago

DOBEN commented 5 months ago

Purpose

Fix circular dependency between index and WalletConnect.ts files.

Changes

DOBEN commented 5 months ago

It caused a problem when using the library in the wallet-connect-test-bench, with the below error: I was hoping that it automatically correctly resolves the exported constants and imports the constants at the top of the file. I suspect that the problem is that everything in WalletConnect file is exported again (so we export the constants several times and it is not clear that they are the same or which constants need to be referenced).

Moving the constants to a separate file and importing it at the top of the file resolved the error. Screenshot from 2024-04-23 17-07-01

bisgardo commented 5 months ago

It caused a problem when using the library in the wallet-connect-test-bench, with the below error: I was hoping that it automatically correctly resolves the exported constants and imports the constants at the top of the file. I suspect that the problem is that everything in WalletConnect file is exported again (so we export the constants several times and it is not clear that they are the same or which constants need to be referenced).

Moving the constants to a separate file and importing it at the top of the file resolved the error. Screenshot from 2024-04-23 17-07-01

Interesting, I guess wallet-connect-test-bench is built differently than the samples? That could probably have something to do with it 🤔