@dynamic-labs/wagmi-connector 4.79.2 → 4.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/lib/Connector.js +19 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.81.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.80.0...v4.81.0) (2026-05-07)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **react-native:** add waitForAuthSuccess() to auth module ([#11137](https://github.com/dynamic-labs/dynamic-auth/issues/11137)) ([089a566](https://github.com/dynamic-labs/dynamic-auth/commit/089a5663283639e7e425eead291b135010c8b398))
|
|
8
|
+
* **waas:** hook Aleo into DynamicWaasMixin ([#11102](https://github.com/dynamic-labs/dynamic-auth/issues/11102)) ([ff42df9](https://github.com/dynamic-labs/dynamic-auth/commit/ff42df99d8993e22894caee3c0570cd9c332a3d1))
|
|
9
|
+
* **widget:** shielded/unshielded tabs + Shield Manually CTA on ActiveWalletBalance for Aleo ([#11103](https://github.com/dynamic-labs/dynamic-auth/issues/11103)) ([e278836](https://github.com/dynamic-labs/dynamic-auth/commit/e278836bfcb19c13828c10483ebb87d165f5d00d))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **ethereum-aa:** return hex chain ids from EIP-5792 getCapabilities ([#11146](https://github.com/dynamic-labs/dynamic-auth/issues/11146)) ([b32dc8f](https://github.com/dynamic-labs/dynamic-auth/commit/b32dc8f6fdee3722073921787c4f77908ab4f740))
|
|
15
|
+
* remediate high-severity dependency vulnerabilities ([#11151](https://github.com/dynamic-labs/dynamic-auth/issues/11151)) ([1d84ef1](https://github.com/dynamic-labs/dynamic-auth/commit/1d84ef12e10544be0b2a80dbbbd63f615b03adc3))
|
|
16
|
+
* **wagmi-connector:** emit change unconditionally on MM accountsChanged DYNT-549 ([#11131](https://github.com/dynamic-labs/dynamic-auth/issues/11131)) ([348ee6f](https://github.com/dynamic-labs/dynamic-auth/commit/348ee6ff9a22cb55ef0cb84c4b8f8d2e843bd10e)), closes [#11043](https://github.com/dynamic-labs/dynamic-auth/issues/11043)
|
|
17
|
+
|
|
18
|
+
## [4.80.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.79.2...v4.80.0) (2026-05-05)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **aleo:** Aleo wallet connectors + send/shield token registries + UI transaction type ([#11101](https://github.com/dynamic-labs/dynamic-auth/issues/11101)) ([5478d9c](https://github.com/dynamic-labs/dynamic-auth/commit/5478d9c21ee065e2e6c8e96d37ab17b74c5aa0f8))
|
|
24
|
+
* **midnight:** add address query methods and getProvider to InjectedWalletBase ([#11082](https://github.com/dynamic-labs/dynamic-auth/issues/11082)) ([9b6a870](https://github.com/dynamic-labs/dynamic-auth/commit/9b6a8709f83d04673e9dbe23bb0caae5827b036c))
|
|
25
|
+
* **ton:** recognize v3R1/v3R2/v4 wallets in TonConnect proof verification ([#11130](https://github.com/dynamic-labs/dynamic-auth/issues/11130)) ([6c40ab1](https://github.com/dynamic-labs/dynamic-auth/commit/6c40ab11e56d56e278aeb5ee2ae982a42767b5cb))
|
|
26
|
+
|
|
2
27
|
### [4.79.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.79.1...v4.79.2) (2026-05-04)
|
|
3
28
|
|
|
4
29
|
|
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wagmi-connector",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.81.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@wagmi/core": "^2.6.4",
|
|
6
6
|
"react": ">=18.0.0 <20.0.0",
|
|
7
7
|
"viem": "^2.45.3",
|
|
8
8
|
"wagmi": "^2.14.11",
|
|
9
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
10
|
-
"@dynamic-labs/ethereum-core": "4.
|
|
11
|
-
"@dynamic-labs/logger": "4.
|
|
12
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
13
|
-
"@dynamic-labs/sdk-react-core": "4.
|
|
14
|
-
"@dynamic-labs/types": "4.
|
|
15
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
9
|
+
"@dynamic-labs/assert-package-version": "4.81.0",
|
|
10
|
+
"@dynamic-labs/ethereum-core": "4.81.0",
|
|
11
|
+
"@dynamic-labs/logger": "4.81.0",
|
|
12
|
+
"@dynamic-labs/rpc-providers": "4.81.0",
|
|
13
|
+
"@dynamic-labs/sdk-react-core": "4.81.0",
|
|
14
|
+
"@dynamic-labs/types": "4.81.0",
|
|
15
|
+
"@dynamic-labs/wallet-connector-core": "4.81.0",
|
|
16
16
|
"eventemitter3": "5.0.1"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
package/src/lib/Connector.js
CHANGED
|
@@ -91,31 +91,32 @@ const getCreateConnectorFn = ({ connectorId, wallet, }) => createConnector((conf
|
|
|
91
91
|
},
|
|
92
92
|
name: 'Dynamic',
|
|
93
93
|
onAccountsChanged(accounts) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
// Wallet-internal switch (e.g. user toggled accounts inside the MetaMask
|
|
98
|
-
// extension while the Dynamic primary wallet is still bound to this
|
|
99
|
-
// connector). Tell wagmi directly so it doesn't lag a step behind. Safe
|
|
100
|
-
// against SyncDynamicWagmi races because the synthetic newId
|
|
101
|
-
// (`${connector.id}-${wallet.address}`) is unchanged in this branch, so
|
|
102
|
-
// SyncDynamicWagmi.sync() returns early instead of fighting us. DYNT-549.
|
|
103
|
-
if (next && bound && next === bound) {
|
|
104
|
-
config.emitter.emit('change', {
|
|
105
|
-
accounts: accounts.map((a) => getAddress(a)),
|
|
106
|
-
});
|
|
94
|
+
// Empty accounts means the wallet was disconnected at the provider level;
|
|
95
|
+
// SyncDynamicWagmi handles that path via its own disconnect flow.
|
|
96
|
+
if (!accounts[0]) {
|
|
107
97
|
return;
|
|
108
98
|
}
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
//
|
|
112
|
-
|
|
113
|
-
|
|
99
|
+
// Always tell wagmi directly. The previous `next === bound` guard
|
|
100
|
+
// (DYNT-549) was unreachable in practice: `wallet` is the closure-
|
|
101
|
+
// captured EthereumWallet from getCreateConnectorFn, and the SDK replaces
|
|
102
|
+
// wallets via connector.createWallet({...}) (useConnectWallet.ts) rather
|
|
103
|
+
// than mutating address in place — so the bound address is frozen at the
|
|
104
|
+
// value it had when this connector was built. Without the emit, wagmi
|
|
105
|
+
// only catches up on the React re-render path
|
|
106
|
+
// (refreshConnectedWallet → new evmWallet → SyncDynamicWagmi disconnect/
|
|
107
|
+
// reconnect), which Lighter reported is unreliable when no Dynamic UI
|
|
108
|
+
// (e.g. <DynamicWidget />) is mounted to drive the render cadence.
|
|
109
|
+
const checksummedAccounts = accounts.map((a) => getAddress(a));
|
|
110
|
+
logger.instrument('[DynamicWagmiConnector] onAccountsChanged', {
|
|
111
|
+
accounts: checksummedAccounts,
|
|
114
112
|
connectorId,
|
|
115
113
|
key: 'wagmi-connector.onAccountsChanged',
|
|
116
114
|
primaryWalletAddress: wallet === null || wallet === void 0 ? void 0 : wallet.address,
|
|
117
115
|
time: 0,
|
|
118
116
|
});
|
|
117
|
+
config.emitter.emit('change', {
|
|
118
|
+
accounts: checksummedAccounts,
|
|
119
|
+
});
|
|
119
120
|
},
|
|
120
121
|
onChainChanged(chainId) {
|
|
121
122
|
config.emitter.emit('change', {
|