WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.35k stars 674 forks source link

Breaking metadata type change in ethereum-provider@2.13.1 #4581

Closed ahollenbach closed 3 months ago

ahollenbach commented 3 months ago

Describe the bug

EthereumProvider.init({}) requires specifying a metadata in patch version 2.13.1, where it was not previously required in 2.13.0. This was seemingly introduced in this PR: https://github.com/WalletConnect/walletconnect-monorepo/pull/4554

SDK Version (if relevant)

To Reproduce

Create a new app using WalletConnect EthereumProvider with 2.13.0, specifying no metadata. Upgrade to 2.13.1.

Expected behavior

Should not be required, as per the docs and previous versions of the package.

linear[bot] commented 3 months ago

CR-44 Breaking metadata type change in ethereum-provider@2.13.1

lukaisailovic commented 3 months ago

Hi @ahollenbach, We mistakenly published minor version with this change. We've released version 2.13.2 that reverts the change and makes the parameter optional again. Sorry for the inconvenience!

ahollenbach commented 3 months ago

Thanks!

ankushswar1 commented 3 months ago

Hi @lukaisailovic - just following up here, upgrading to that version unfortunately does not resolve the issue. It updates the type to not require metadata, but at runtime, an error is still thrown if metadata is not passed. Would greatly appreciate if you could release another patch as this is breaking a few integrations!

lukaisailovic commented 3 months ago

@ankushswar1 That is the intended behavior. Can you please share more insight regarding the integration that is breaking on your side?

ahollenbach commented 3 months ago

The repro remains the same:

Create a new app using WalletConnect EthereumProvider with 2.13.0, specifying no metadata. Upgrade to 2.13.2. Breaks at runtime.

Unfortunately, this is net more confusing, as the build time type check does not match and will silently pass lint, only to error at runtime on an end-user's browser, causing WalletConnect to not work.

lukaisailovic commented 3 months ago

@ahollenbach @ankushswar1 We've released 2.13.3 that removes metadata validation at runtime for now. We'll re-introduce this in the next major version along with type upgrade