Skip to content

Commit 648d708

Browse files
authored
Merge branch 'main' into fix/coinbase-4100-provider-reauth
2 parents 6ecd104 + da65c78 commit 648d708

74 files changed

Lines changed: 1196 additions & 123 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
---
2-
'@reown/appkit-utils': patch
2+
'@reown/appkit-adapter-wagmi': patch
3+
'pay-test-exchange': patch
4+
'@reown/appkit-adapter-bitcoin': patch
5+
'@reown/appkit-adapter-ethers': patch
6+
'@reown/appkit-adapter-ethers5': patch
7+
'@reown/appkit-adapter-solana': patch
8+
'@reown/appkit-adapter-ton': patch
9+
'@reown/appkit-adapter-tron': patch
310
'@reown/appkit': patch
11+
'@reown/appkit-utils': patch
412
'@reown/appkit-cdn': patch
513
'@reown/appkit-cli': patch
614
'@reown/appkit-codemod': patch
715
'@reown/appkit-common': patch
16+
'@reown/appkit-controllers': patch
817
'@reown/appkit-core': patch
918
'@reown/appkit-experimental': patch
1019
'@reown/appkit-pay': patch
@@ -15,16 +24,8 @@
1524
'@reown/appkit-testing': patch
1625
'@reown/appkit-ui': patch
1726
'@reown/appkit-universal-connector': patch
18-
'@reown/appkit-wallet-button': patch
1927
'@reown/appkit-wallet': patch
20-
'@reown/appkit-controllers': patch
21-
'@reown/appkit-adapter-bitcoin': patch
22-
'@reown/appkit-adapter-ethers': patch
23-
'@reown/appkit-adapter-ethers5': patch
24-
'@reown/appkit-adapter-solana': patch
25-
'@reown/appkit-adapter-ton': patch
26-
'@reown/appkit-adapter-tron': patch
27-
'@reown/appkit-adapter-wagmi': patch
28+
'@reown/appkit-wallet-button': patch
2829
---
2930

30-
Fixed TRON `tron_signTransaction` payload shape to respect the wallet's `tron_method_version` session property. The connector now sends the spec-mandated legacy nested `transaction.transaction` shape by default, and the simplified flat shape only when the wallet advertises `tron_method_version: "v1"` in `sessionProperties`.
31+
Fix `coinbasePreference` option being ignored — `'all'` and `'eoaOnly'` now correctly use the `coinbaseWallet` connector (with QR code support) instead of always using `baseAccount`. `'smartWalletOnly'` uses `baseAccount`. Regression introduced in PR #5269.

.changeset/headless-read-wcuri.md

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
---
2-
'@reown/appkit-utils': patch
2+
'@reown/appkit-adapter-ethers5': patch
3+
'@reown/appkit-adapter-ethers': patch
4+
'pay-test-exchange': patch
5+
'@reown/appkit-adapter-bitcoin': patch
6+
'@reown/appkit-adapter-solana': patch
7+
'@reown/appkit-adapter-ton': patch
8+
'@reown/appkit-adapter-tron': patch
9+
'@reown/appkit-adapter-wagmi': patch
310
'@reown/appkit': patch
11+
'@reown/appkit-utils': patch
412
'@reown/appkit-cdn': patch
513
'@reown/appkit-cli': patch
614
'@reown/appkit-codemod': patch
715
'@reown/appkit-common': patch
16+
'@reown/appkit-controllers': patch
817
'@reown/appkit-core': patch
918
'@reown/appkit-experimental': patch
1019
'@reown/appkit-pay': patch
@@ -15,18 +24,14 @@
1524
'@reown/appkit-testing': patch
1625
'@reown/appkit-ui': patch
1726
'@reown/appkit-universal-connector': patch
18-
'@reown/appkit-wallet-button': patch
1927
'@reown/appkit-wallet': patch
20-
'@reown/appkit-controllers': patch
21-
'@reown/appkit-adapter-bitcoin': patch
22-
'@reown/appkit-adapter-ethers': patch
23-
'@reown/appkit-adapter-ethers5': patch
24-
'@reown/appkit-adapter-solana': patch
25-
'@reown/appkit-adapter-ton': patch
26-
'@reown/appkit-adapter-tron': patch
27-
'@reown/appkit-adapter-wagmi': patch
28+
'@reown/appkit-wallet-button': patch
2829
---
2930

30-
Add headless reset methods for the WalletConnect URI + connecting-wallet state.
31+
fix(ethers,ethers5): resolve walletProvider after account switch in modal
3132

32-
The AppKit instance now exposes `resetWalletConnectUri()` and `resetConnectingWallet()` — thin passthroughs to `HeadlessWalletUtil.resetWcUri()` / `resetConnectingWallet()`. A headless host that reads the URI via `getWalletConnectUri()` can now clear it (e.g. when a QR is dismissed or a connection is cancelled) through the instance, without importing `@reown/appkit-controllers`. This completes the headless WalletConnect-URI surface alongside `getWalletConnectUri` / `subscribeWalletConnectUri` / `prefetchWalletConnectUri`.
33+
`useAppKitProvider` returned a stale provider when switching accounts inside the
34+
modal. In the early-return path of `connect()`, `connector.provider` was never
35+
initialised, causing the base-client's `accountChanged` handler to skip
36+
`syncProvider()`. The provider is now resolved from `ethersProviders` before the
37+
event is emitted.

.changeset/headless-wallets-on-client.md renamed to .changeset/prefer-universal-links-deeplink-choice.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,4 @@
2727
'@reown/appkit-adapter-wagmi': patch
2828
---
2929

30-
Expose the headless wallet list imperatively on the AppKit client, so a non-React host can list / search / connect wallets without the `useAppKitWallets` React hook.
31-
32-
New `AppKit` instance methods: `fetchWallets(options?)`, `getWalletList()`, `subscribeWalletList(cb)`, `getWalletConnectUri(options?)`, and `connectWallet(wallet, namespace?, options?)`. The shared imperative logic lives in a new `HeadlessWalletUtil` (`@reown/appkit-controllers`), which both the client methods and the React hook can use — one tested code path for headless wallet listing, search, pagination, the WalletConnect URI, and programmatic connect (injected / API / mobile-deeplink).
30+
fix: persist the universal-link base as the WalletConnect deeplink choice when `experimental_preferUniversalLinks` is enabled, so session-request re-opens (handled by universal-provider) use the wallet's universal link instead of falling back to its native custom scheme

apps/laboratory/src/constants/appKitConfigs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ export const appKitConfigs = {
385385
// ----- Custom Variants ------------------------------
386386
'siwx-default': {
387387
...commonAppKitConfig,
388-
adapters: ['ethers', 'solana', 'bitcoin'],
388+
adapters: ['ethers', 'solana', 'bitcoin', 'tron'],
389389
networks: ConstantsUtil.AllNetworks,
390390
siwx: new DefaultSIWX()
391391
},

packages/adapters/bitcoin/CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# @reown/appkit-adapter-bitcoin
22

3+
## 1.8.22
4+
5+
### Patch Changes
6+
7+
- [#5697](https://github.com/reown-com/appkit/pull/5697) [`6b9c313`](https://github.com/reown-com/appkit/commit/6b9c313ea77bfaddc670ba5bdb0d616179f21728) Thanks [@enesozturk](https://github.com/enesozturk)! - Add a headless read for the WalletConnect URI, so a host can render a QR without the `useAppKitWallets` React hook.
8+
9+
The AppKit instance now exposes `getWalletConnectUri()` — returning `{ wcUri, wcError, wcFetchingUri }` — and `subscribeWalletConnectUri()`. Both read the connection layer directly (mirroring the existing `getWalletList()` / `subscribeWalletList()` pair), so a headless host gets the URI ungated through the instance without importing `@reown/appkit-controllers` (which can otherwise resolve to a different valtio singleton). This replaces the connection-level `subscribeConnections`, which is gated behind the `multiWallet` remote feature and so can't serve the URI for a single-wallet QR.
10+
11+
**Breaking:** the imperative pre-fetch trigger previously named `getWalletConnectUri()` is renamed to `prefetchWalletConnectUri()`, freeing `getWalletConnectUri()` for the new read.
12+
13+
- [#5701](https://github.com/reown-com/appkit/pull/5701) [`fb09a6d`](https://github.com/reown-com/appkit/commit/fb09a6d9c48a7c9c4ccc4d4d553663920b89365e) Thanks [@enesozturk](https://github.com/enesozturk)! - Add headless reset methods for the WalletConnect URI + connecting-wallet state.
14+
15+
The AppKit instance now exposes `resetWalletConnectUri()` and `resetConnectingWallet()` — thin passthroughs to `HeadlessWalletUtil.resetWcUri()` / `resetConnectingWallet()`. A headless host that reads the URI via `getWalletConnectUri()` can now clear it (e.g. when a QR is dismissed or a connection is cancelled) through the instance, without importing `@reown/appkit-controllers`. This completes the headless WalletConnect-URI surface alongside `getWalletConnectUri` / `subscribeWalletConnectUri` / `prefetchWalletConnectUri`.
16+
17+
- [#5695](https://github.com/reown-com/appkit/pull/5695) [`a4b2d2f`](https://github.com/reown-com/appkit/commit/a4b2d2ff67f1712a3a19d31755c5de1e3c9b500d) Thanks [@enesozturk](https://github.com/enesozturk)! - Expose the headless wallet list imperatively on the AppKit client, so a non-React host can list / search / connect wallets without the `useAppKitWallets` React hook.
18+
19+
New `AppKit` instance methods: `fetchWallets(options?)`, `getWalletList()`, `subscribeWalletList(cb)`, `getWalletConnectUri(options?)`, and `connectWallet(wallet, namespace?, options?)`. The shared imperative logic lives in a new `HeadlessWalletUtil` (`@reown/appkit-controllers`), which both the client methods and the React hook can use — one tested code path for headless wallet listing, search, pagination, the WalletConnect URI, and programmatic connect (injected / API / mobile-deeplink).
20+
21+
- [#5694](https://github.com/reown-com/appkit/pull/5694) [`1c17897`](https://github.com/reown-com/appkit/commit/1c17897a19333987aecb392c1e8513b6753f9c11) Thanks [@enesozturk](https://github.com/enesozturk)! - Fixed TRON `tron_signTransaction` payload shape to respect the wallet's `tron_method_version` session property. The connector now sends the spec-mandated legacy nested `transaction.transaction` shape by default, and the simplified flat shape only when the wallet advertises `tron_method_version: "v1"` in `sessionProperties`.
22+
23+
- Updated dependencies [[`6b9c313`](https://github.com/reown-com/appkit/commit/6b9c313ea77bfaddc670ba5bdb0d616179f21728), [`fb09a6d`](https://github.com/reown-com/appkit/commit/fb09a6d9c48a7c9c4ccc4d4d553663920b89365e), [`a4b2d2f`](https://github.com/reown-com/appkit/commit/a4b2d2ff67f1712a3a19d31755c5de1e3c9b500d), [`1c17897`](https://github.com/reown-com/appkit/commit/1c17897a19333987aecb392c1e8513b6753f9c11)]:
24+
- @reown/appkit-utils@1.8.22
25+
- @reown/appkit@1.8.22
26+
- @reown/appkit-common@1.8.22
27+
- @reown/appkit-polyfills@1.8.22
28+
- @reown/appkit-controllers@1.8.22
29+
330
## 1.8.21
431

532
### Patch Changes

packages/adapters/bitcoin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reown/appkit-adapter-bitcoin",
3-
"version": "1.8.21",
3+
"version": "1.8.22",
44
"sideEffects": false,
55
"type": "module",
66
"main": "./dist/esm/exports/index.js",

packages/adapters/ethers/CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# @reown/appkit-adapter-ethers
22

3+
## 1.8.22
4+
5+
### Patch Changes
6+
7+
- [#5697](https://github.com/reown-com/appkit/pull/5697) [`6b9c313`](https://github.com/reown-com/appkit/commit/6b9c313ea77bfaddc670ba5bdb0d616179f21728) Thanks [@enesozturk](https://github.com/enesozturk)! - Add a headless read for the WalletConnect URI, so a host can render a QR without the `useAppKitWallets` React hook.
8+
9+
The AppKit instance now exposes `getWalletConnectUri()` — returning `{ wcUri, wcError, wcFetchingUri }` — and `subscribeWalletConnectUri()`. Both read the connection layer directly (mirroring the existing `getWalletList()` / `subscribeWalletList()` pair), so a headless host gets the URI ungated through the instance without importing `@reown/appkit-controllers` (which can otherwise resolve to a different valtio singleton). This replaces the connection-level `subscribeConnections`, which is gated behind the `multiWallet` remote feature and so can't serve the URI for a single-wallet QR.
10+
11+
**Breaking:** the imperative pre-fetch trigger previously named `getWalletConnectUri()` is renamed to `prefetchWalletConnectUri()`, freeing `getWalletConnectUri()` for the new read.
12+
13+
- [#5701](https://github.com/reown-com/appkit/pull/5701) [`fb09a6d`](https://github.com/reown-com/appkit/commit/fb09a6d9c48a7c9c4ccc4d4d553663920b89365e) Thanks [@enesozturk](https://github.com/enesozturk)! - Add headless reset methods for the WalletConnect URI + connecting-wallet state.
14+
15+
The AppKit instance now exposes `resetWalletConnectUri()` and `resetConnectingWallet()` — thin passthroughs to `HeadlessWalletUtil.resetWcUri()` / `resetConnectingWallet()`. A headless host that reads the URI via `getWalletConnectUri()` can now clear it (e.g. when a QR is dismissed or a connection is cancelled) through the instance, without importing `@reown/appkit-controllers`. This completes the headless WalletConnect-URI surface alongside `getWalletConnectUri` / `subscribeWalletConnectUri` / `prefetchWalletConnectUri`.
16+
17+
- [#5695](https://github.com/reown-com/appkit/pull/5695) [`a4b2d2f`](https://github.com/reown-com/appkit/commit/a4b2d2ff67f1712a3a19d31755c5de1e3c9b500d) Thanks [@enesozturk](https://github.com/enesozturk)! - Expose the headless wallet list imperatively on the AppKit client, so a non-React host can list / search / connect wallets without the `useAppKitWallets` React hook.
18+
19+
New `AppKit` instance methods: `fetchWallets(options?)`, `getWalletList()`, `subscribeWalletList(cb)`, `getWalletConnectUri(options?)`, and `connectWallet(wallet, namespace?, options?)`. The shared imperative logic lives in a new `HeadlessWalletUtil` (`@reown/appkit-controllers`), which both the client methods and the React hook can use — one tested code path for headless wallet listing, search, pagination, the WalletConnect URI, and programmatic connect (injected / API / mobile-deeplink).
20+
21+
- [#5694](https://github.com/reown-com/appkit/pull/5694) [`1c17897`](https://github.com/reown-com/appkit/commit/1c17897a19333987aecb392c1e8513b6753f9c11) Thanks [@enesozturk](https://github.com/enesozturk)! - Fixed TRON `tron_signTransaction` payload shape to respect the wallet's `tron_method_version` session property. The connector now sends the spec-mandated legacy nested `transaction.transaction` shape by default, and the simplified flat shape only when the wallet advertises `tron_method_version: "v1"` in `sessionProperties`.
22+
23+
- Updated dependencies [[`6b9c313`](https://github.com/reown-com/appkit/commit/6b9c313ea77bfaddc670ba5bdb0d616179f21728), [`fb09a6d`](https://github.com/reown-com/appkit/commit/fb09a6d9c48a7c9c4ccc4d4d553663920b89365e), [`a4b2d2f`](https://github.com/reown-com/appkit/commit/a4b2d2ff67f1712a3a19d31755c5de1e3c9b500d), [`1c17897`](https://github.com/reown-com/appkit/commit/1c17897a19333987aecb392c1e8513b6753f9c11)]:
24+
- @reown/appkit-utils@1.8.22
25+
- @reown/appkit@1.8.22
26+
- @reown/appkit-common@1.8.22
27+
- @reown/appkit-polyfills@1.8.22
28+
- @reown/appkit-scaffold-ui@1.8.22
29+
- @reown/appkit-wallet@1.8.22
30+
- @reown/appkit-controllers@1.8.22
31+
332
## 1.8.21
433

534
### Patch Changes

packages/adapters/ethers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reown/appkit-adapter-ethers",
3-
"version": "1.8.21",
3+
"version": "1.8.22",
44
"sideEffects": false,
55
"type": "module",
66
"main": "./dist/esm/src/index.js",

packages/adapters/ethers/src/client.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,18 @@ export class EthersAdapter extends AdapterBlueprint {
459459
}
460460

461461
if (connection.account) {
462+
/*
463+
* Resolve the provider before emitting so the base-client's accountChanged
464+
* handler can call syncProvider() — keeping useAppKitProvider reactive
465+
* when the user switches accounts inside the modal.
466+
*/
467+
const ethersProvider =
468+
this.ethersProviders[connector.id as keyof Omit<ProviderType, 'metadata' | 'EIP6963'>]
469+
if (!connector.provider && ethersProvider) {
470+
await ethersProvider.initialize()
471+
connector.provider = (await ethersProvider.getProvider()) as Provider | undefined
472+
}
473+
462474
this.emit('accountChanged', {
463475
address: this.toChecksummedAddress(connection.account.address),
464476
chainId: caipNetwork.id,

0 commit comments

Comments
 (0)