Add @goodwidget/goodreserve-widget with reserve swap runtime contract, quote/tx state machine, and Storybook/demo coverage#39
Draft
Copilot wants to merge 4 commits into
Draft
Conversation
7 tasks
Copilot
AI
changed the title
[WIP] Build GoodReserve widget backed by GoodReserve SDK
Add May 27, 2026
@goodwidget/goodreserve-widget with reserve swap runtime contract, quote/tx state machine, and Storybook/demo coverage
Contributor
|
@copilot the skills folder should not be committed so can be removed. can you also produce initial screenshots of the story examples |
Author
Implemented in commit
|
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the first
packages/goodreserve-widgetpackage to prove GoodWidget supports a quote-driven reserve swap flow (buy/sell) with reserve-specific state handling and reusable widget packaging.It maps the swap UX structure from GoodWalletV2 into a widget-local implementation and adds deterministic story/demo coverage for all required states.
Widget package scaffold + runtime contract
@goodwidget/goodreserve-widgetpackage scaffold (package.json, tsconfig/tsup, React + element/register entrypoints).widgetRuntimeContract.ts+integration.tsdefining reserve states/events/dependencies (no_provider,unsupported_chain,quote_*,confirm_dialog,swap_*, etc.).src/index.ts.Reserve swap UI + local adapter/state
GoodReserveWidget,ReserveSwapView, anduseGoodReserveAdapter.GoodWidgetProviderpath and chain gating for Celo (42220) + XDC (50).SDK wiring and explicit reserve dependency handling
@goodsdks/good-reserveis unavailable at runtime (reported as a blocker condition, not silently ignored).Storybook coverage (widget-scoped, deterministic)
examples/storybook/src/stories/goodreserve-widget/GoodReserveWidget.stories.tsx.examples/storybook/src/fixtures/goodReserveWidgetMock.ts.Demo verification coverage
tests/widgets/goodreserve-widget/states.spec.tswith deterministic Playwright checks mapped to widget stories.Workspace/docs wiring
@goodwidget/goodreserve-widget.goodreserve-widget.