Repository navigation
[GoodBounty] Fix per-chain decimals, wallet-gate, and chain-selection bugs in Bridging GoodWidget #257
Copy link
Copy link
Open
Labels
GoodBounties - EpicSignificant featuresSignificant features
Description
Summary
Bugs found in manual + AI review of PR #251 (Bridging GoodWidget). Scope here covers issues that affect what the user signs or sees as correct. The History-tab fixes (grouping key, per-entry failure handling, pending polling) are already included on PR #251's branch (not yet merged to main) and are not part of this bounty — except for two regressions those fixes introduced, listed below.
Related: [Feature] #243, [Plan] #244, PR #251
Contributor task
- Claim the bounty with an ETA.
- Check out PR feat(bridging-widget): implement GoodWidget bridging widget (#243) #251's branch and run it locally.
- Fix the issues below.
- Add/update fixtures and test evidence, including the two fixed fixtures and the missing interactive submit-flow test called out below.
- Leave a handoff comment with what changed and what was tested.
Scope checks
- G$ decimals are derived per chain from bridging-sdk's
SUPPORTED_CHAINSinstead of the hardcodedG_DOLLAR_DECIMALS = 18— source-chain decimals for input/balance/quote amount, destination-chain decimals for protocol fee/amount received. Currently breaks Fuse (122) and Ethereum (1), both 2-decimal G$ chains:useBridgeQuote.ts:64reads an input of100as10^18on Fuse, producing a false "Insufficient G$ balance";AmountEntry.tsx:34/adapter.ts:111show ~0 balance/MAX;FeeBreakdown.tsx/ReviewScreen.tsxshow ~0 received amount/protocol fee when the destination is Fuse or Ethereum. Add Fuse-source and Fuse-destination fixtures. - Disconnected-wallet state keeps the Bridge UI visible with "Connect Wallet" as the primary action and balances shown as "—", using
WalletControlsfrom@goodwidget/core(per [Plan] [DRAFT][PLAN] Bridging GoodWidget using the bridging SDK #244) — currentlyWalletGatereplaces the whole UI instead. - Source chain is freely selectable in-widget (not just inferred from the wallet's current connected chain), with live quotes updating as source/destination change.
switchChainshould only be requested when the user clicks Bridge, not at selection time. - LayerZero lists its actual supported chains instead of showing the generic label "LayerZero" (per the acceptance criteria).
- Destination chain buttons and the header badge show chain names, not raw numeric chain IDs.
- Displayed provider fee matches the actual amount charged — currently shown ~10% below what's sent due to an SDK buffer; surface the correct value.
- Prevent submitting a stale quote: while a new quote is loading, the old quote and the Review button shouldn't stay actionable, and Retry must resubmit against the latest quote, not a stale one.
- Reset route/amount state when the connected account or the selected source chain changes.
- Fix two regressions introduced by the Oct 16 History-tab fix on PR feat(bridging-widget): implement GoodWidget bridging widget (#243) #251's branch: the list shouldn't flip back to a loading spinner and rescan every chain on each 15s poll; entries whose status lookup fails should render as pending (not be dropped), since those are exactly the in-flight ones.
- Add an interactive Playwright test covering the full submit flow end-to-end (select route → amount → review → confirm → submit) — currently missing.
- Fix two incorrect test/Storybook fixtures: a Fuse→Celo route fixture uses Axelar (Axelar only supports Celo↔ETH per spec); a "wrong chain" fixture uses Ethereum, which is actually a supported chain.
Decided, not a bug
- Tapping a pending History entry opens a read-only detail drawer rather than the Confirm modal. Confirmed acceptable as-is — the drawer matches existing GoodWallet v2 mobile UX for similar dialogs (most users are on mobile). No change needed.
Out of scope / follow-ups (tracked separately)
- SSR guard in
register.ts(one-line fix, same pattern asai-credits-widget) — low priority. - Explicit From/To network rows on the Confirm screen.
- Playwright baseline screenshots are saved but not diffed/compared in CI.
- Verify
cloudflare-eth.comis still a live public RPC endpoint. - Accessibility: close-button keyboard focus/labels, MAX button semantics, keyboard-accessible history rows.
- Upstream SDK bug in
@goodsdks/bridging-sdk'sgetChainHistory(RPC block-range limits) — tracked in a separate GoodSDKs issue, does not block this bounty. - Two Copilot findings on PR feat(bridging-widget): implement GoodWidget bridging widget (#243) #251 were investigated and don't apply: the "show native token symbol on provider fee" comments were false positives — the SDK's fee string already includes the symbol; the Storybook fixture used in review was missing a unit, so the fixture needs fixing, not the widget. The SSR-guard finding is valid but was over-rated as "High" severity — the same pattern exists elsewhere in the repo.
Required commands
pnpm install
pnpm build
pnpm lint
pnpm test:demo tests/widgets/bridging-widgetIf a command cannot be run, document why.
Handoff comment
Contributor: @<handle>
PR: #<pr>
Commit: <commit>
Fixed:
- <fix>
Verified:
- <scenario>: <result>
Evidence:
- <confirm which scenarios/UX flows are testable via the Playwright tests>
Remaining risks:
- <None / details>Metadata
Metadata
Assignees
Labels
GoodBounties - EpicSignificant featuresSignificant features
Type
Projects
- StatusShow more project fieldsIn Review
Activity
edehvictor commentedon Oct 16, 2026
GM @L03TJ3 ,
I’d like to take this on. I’m an active GoodDollar open-source contributor and have worked on GoodWidget/GoodWallet-related flows before, including implementation cleanup, UI consistency, Storybook/Playwright verification, and reviewer feedback fixes.
I’ll review the requirements carefully, keep the changes scoped, run the needed checks, and provide a clear handoff when done.
Please could you confirm the rewards amount.
ETA: 18-32 hours.
ayqy commentedon Oct 16, 2026
Hi maintainers — is #257 still open to another contributor, or has the existing request to take it on already been accepted? Could you confirm the approved reward amount and payout currency/asset for the complete four-fix scope in PR #251: per-chain decimals, the disconnected-wallet UI, source-chain switching, and LayerZero chain labels? I would like to clarify the paid scope before duplicating work.
[-][GoodBounty] Fix per-chain decimals, wallet-gate, and chain-selection bugs in Bridging GoodWidget[/-][+][GoodBounty][DRAFT] Fix per-chain decimals, wallet-gate, and chain-selection bugs in Bridging GoodWidget[/+]L03TJ3 commentedon Oct 17, 2026
@ayqy @edehvictor This bounty was prematurely posted and some details might still get updated.
Added the label draft for this.
will notify once the bounty is ready for pickup.
edehvictor commentedon Oct 17, 2026
Okay, @L03TJ3. Eyes on it 👀
ocakciomursel-pixel commentedon Oct 18, 2026
Contributor: @ocakciomursel-pixel
PR: #262
Commit: 1250287
Fixed:
@goodsdks/bridging-sdk'sSUPPORTED_CHAINS(Fuse 122 & Ethereum 1 have 2 decimals, Celo 42220 & XDC 50 have 18 decimals) instead of hardcoding 18.useBridgeQuote.ts(resolving falseINSUFFICIENT_BALANCEon Fuse/Ethereum) and for balance/MAX calculation inAmountEntry.tsxandadapter.ts.FeeBreakdown.tsxandReviewScreen.tsx.—andConnect Walletas the primary action, and mounts<WalletControls />from@goodwidget/corein the header.switchChain.PROTOCOL_LABELS.LAYERZEROto list all supported chains:LayerZero (Celo, Ethereum, Fuse, XDC).Verified:
pnpm --filter @goodwidget/bridging-widget build: Clean build (ESM, CJS, DTS).pnpm --filter @goodwidget/bridging-widget lint: 0 errors, 0 warnings.FuseSource(Fuse 2 decimals as source -> Celo 18 decimals) andFuseDestination(Celo 18 decimals as source -> Fuse 2 decimals) inBridgingWidgetQA.stories.tsx.pnpm test:demo tests/widgets/bridging-widget: 20/20 Playwright specs passed.tests/widgets/bridging-widget/test-results/(includingbw-27-fuse-source.pngandbw-28-fuse-destination.png).Evidence:
Connect WalletCTA andBalance: — G$verified viabw-01-no-wallet.bw-03-tab-navigation.bw-27-fuse-source.0.25% (0.25 G$)), and received amount (99.75 G$) verified viabw-28-fuse-destination.bw-13-review-open.Remaining risks:
[-][GoodBounty][DRAFT] Fix per-chain decimals, wallet-gate, and chain-selection bugs in Bridging GoodWidget[/-][+][GoodBounty] Fix per-chain decimals, wallet-gate, and chain-selection bugs in Bridging GoodWidget[/+]L03TJ3 commentedon Oct 21, 2026
@edehvictor you are assigned
edehvictor commentedon Oct 21, 2026
Thank you @L03TJ3
On it already.
edehvictor commentedon Oct 22, 2026
Handoff Comment
Contributor: @edehvictor
PR: #266
Commit: cda1d37
Fixed:
Verified:
pnpm test:demo tests/widgets/bridging-widget— 21 tests: Passed ✅Evidence:
pnpm test:demo tests/widgets/bridging-widgetreproduces them; refreshed screenshots include desktop, mobile, light-theme, and modal states.Remaining Risks:
MavDavis commentedon Nov 1, 2026
still need a reviewer for thus? I can take it.