superfluid-finance / widget

https://checkout-builder.superfluid.finance
MIT License
15 stars 9 forks source link

[WIDGET] Create version compatible with wagmi v2 #236

Open MidnightLightning opened 4 months ago

MidnightLightning commented 4 months ago

Overview

What? The wagmi library has released version 2 of their library which has several breaking changes. For projects that wish to take advantage of the new features of that major version would be good to have a Superfluid Widget version that supports that version of the library.

How? Create a new version of the Widget NPM package (0.4.9?) that sets the peer dependency to be less than 2.0.0 for wagmi (to clearly indicate it does not work with later versions.

Create a new major version of the Widget NPM package (v2.0.0, to keep the widget numbering the same as wagmi's versioning?), set the peer dependency to be at least wagmi v2.0.0, and update the Widget logic to properly pull the logic it needs.

Attempting to use the 0.4.8 version of the Superfluid Widget with wagmi >2.0.0 gives an error of

./node_modules/@superfluid-finance/widget/dist/WidgetCore.js:9:0
Module not found: Package path ./connectors/injected is not exported from package /app/node_modules/wagmi (see exports field in /app/node_modules/wagmi/package.json)

(the "injected" connector is no longer at that code location), so it cannot just be used as-is.

Why? That version was released January 2024, and has had several months to stabilize and have security issues fixed.

Deadline: ??

UI/UX Design: wagmi is a business-logic library; no need for changes to the UI for this library update.

Acceptance criteria

Links/Resources

Readiness criteria

MidnightLightning commented 4 months ago

I attempted to try and update this myself, but found the developer documentation in the README seems incomplete for getting started with development for the widget (running pnpm install in the parent directory did not result in a working development environment). Is there further documentation for how to build and develop for this widget?

kasparkallas commented 4 months ago

The dev container should have everything to get started; and once it's started, the root package.json should have all the helpful scripts for development. The development has usually been done by testing the widget with the Builder app locally.

MidnightLightning commented 4 weeks ago

@kasparkallas I am unable to get the dev container to compile properly; I've logged the errors in getting that container set up as issue #243