Skip to content

feat(controllers): add includePayOnly and sort options to fetchWallets#5685

Merged
enesozturk merged 1 commit into
mainfrom
feat/fetch-wallets-include-pay-only
Jun 6, 2026
Merged

feat(controllers): add includePayOnly and sort options to fetchWallets#5685
enesozturk merged 1 commit into
mainfrom
feat/fetch-wallets-include-pay-only

Conversation

@enesozturk

Copy link
Copy Markdown
Contributor

Summary

Adds two new options to useAppKitWallets().fetchWallets() so headless consumers can surface WalletConnect Pay-capable wallets that the WalletGuide API hides by default:

  • includePayOnly?: boolean → sends include_pay_only=true. By default /getWallets returns only is_v2_compatible wallets, which filters out wallets that support WalletConnect Pay but aren't v2-compatible. This relaxes that to is_v2_compatible OR supports_wcpay.
  • sort?: 'default' | 'wcpay' → sends sort=wcpay, bubbling WCP-supporting wallets to the top.

Both flow through fetchWalletsByPage and searchWallet into the /getWallets request (same pattern as the existing badge → badge_type mapping). Default behavior is unchanged when the options are omitted — general AppKit consumers keep hiding WCP-only wallets.

The backend (web3modal-api) already supports both query params; WcWallet already exposes supports_wcpay. This PR is purely the client plumbing to opt in.

Motivation

WalletConnect Pay's Buyer Experience needs to list WCP-supporting wallets (including WCP-only ones) that wouldn't otherwise appear via the AppKit hooks, without changing behavior for other AppKit integrations.

Changes

  • packages/controllers/src/utils/TypeUtil.ts — add include_pay_only and sort to ApiGetWalletsRequest.
  • packages/controllers/src/controllers/ApiController.ts — accept/forward the options in fetchWalletsByPage, searchWallet, and stringify the boolean in fetchWallets.
  • packages/controllers/exports/react.ts — add the options to the public FetchWalletsOptions.
  • changeset (minor, @reown/appkit-controllers).

Testing

  • pnpm --filter @reown/appkit-controllers typecheck
  • pnpm --filter @reown/appkit-controllers vitest run tests/controllers/ApiController.test.ts → 52 passed, 1 skipped ✅

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 15d14e1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@reown/appkit-utils Patch
@reown/appkit Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-codemod Patch
@reown/appkit-common Patch
@reown/appkit-core Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-polyfills Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-testing Patch
@reown/appkit-ui Patch
@reown/appkit-universal-connector Patch
@reown/appkit-wallet-button Patch
@reown/appkit-wallet Patch
@reown/appkit-controllers Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-ton Patch
@reown/appkit-adapter-tron Patch
@reown/appkit-adapter-wagmi Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
appkit-demo Ready Ready Preview, Comment Jun 5, 2026 10:22pm
appkit-gallery Ready Ready Preview, Comment Jun 5, 2026 10:22pm
appkit-headless-sample-app Ready Ready Preview, Comment Jun 5, 2026 10:22pm
appkit-laboratory Ready Ready Preview, Comment Jun 5, 2026 10:22pm
9 Skipped Deployments
Project Deployment Actions Updated (UTC)
appkit-basic-example Ignored Ignored Jun 5, 2026 10:22pm
appkit-basic-sign-client-example Ignored Ignored Jun 5, 2026 10:22pm
appkit-basic-up-example Ignored Ignored Jun 5, 2026 10:22pm
appkit-ethers5-bera Ignored Ignored Jun 5, 2026 10:22pm
appkit-nansen-demo Ignored Ignored Jun 5, 2026 10:22pm
appkit-wagmi-cdn-example Ignored Ignored Jun 5, 2026 10:22pm
ethereum-provider-wagmi-example Ignored Ignored Jun 5, 2026 10:22pm
next-wagmi-solana-bitcoin-example Ignored Ignored Jun 5, 2026 10:22pm
vue-wagmi-example Ignored Ignored Jun 5, 2026 10:22pm

Request Review

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Visual Regression Test Results ✅ Passed

⚠️ 15 visual change(s) detected

Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=930
Storybook Preview: https://6493191bf4b10fed8ca7353f-axwaekulln.chromatic.com/

👉 Please review the visual changes in Chromatic and accept or reject them.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Check

All bundles are within size limits

📊 View detailed bundle sizes

> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit


> size-limit

@reown/appkit - Main Entry
Size limit:   80 kB
Size:         75.84 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 1.3 s    on Snapdragon 410
Total time:   2.8 s
@reown/appkit/react
Size limit:   236 kB
Size:         235.08 kB with all dependencies, minified and gzipped
Loading time: 4.6 s     on slow 3G
Running time: 1.5 s     on Snapdragon 410
Total time:   6.1 s
@reown/appkit/vue
Size limit:   80 kB
Size:         75.84 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 446 ms   on Snapdragon 410
Total time:   2 s
@reown/appkit-scaffold-ui
Size limit:   220 kB
Size:         214.38 kB with all dependencies, minified and gzipped
Loading time: 4.2 s     on slow 3G
Running time: 831 ms    on Snapdragon 410
Total time:   5.1 s
@reown/appkit-ui
Size limit:   500 kB
Size:         13.16 kB with all dependencies, minified and gzipped
Loading time: 258 ms   on slow 3G
Running time: 134 ms   on Snapdragon 410
Total time:   391 ms

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.56% 39938 / 50832
🔵 Statements 78.56% 39938 / 50832
🔵 Functions 76.17% 4264 / 5598
🔵 Branches 86.66% 9747 / 11247
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/controllers/exports/react.ts 88.7% 87.64% 46.15% 88.7% 71-80, 106-114, 131, 146, 154, 172, 460, 474, 497, 504, 528, 542, 561-562, 564-572, 589-592
packages/controllers/src/controllers/ApiController.ts 95.1% 96.15% 86.44% 95.1% 122-123, 185, 195-198, 273-274, 544-552, 579, 593, 597, 601, 206
Generated in workflow #17142 for commit 15d14e1 by the Vitest Coverage Report Action

Surface wallets that support WalletConnect Pay but are not v2-compatible
(filtered out by default) and allow sorting WCP-supporting wallets to the
top, via two new useAppKitWallets().fetchWallets() options:

- includePayOnly -> include_pay_only=true query param
- sort: 'wcpay' -> sort=wcpay query param

Both flow through fetchWalletsByPage and searchWallet into the /getWallets
request. Default behavior is unchanged when the options are omitted, so
general AppKit consumers keep hiding WCP-only wallets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@enesozturk enesozturk force-pushed the feat/fetch-wallets-include-pay-only branch from e66e0d6 to 15d14e1 Compare June 5, 2026 22:20
@enesozturk enesozturk merged commit ea99fd1 into main Jun 6, 2026
56 of 62 checks passed
@enesozturk enesozturk deleted the feat/fetch-wallets-include-pay-only branch June 6, 2026 06:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants