@dynamic-labs/wagmi-connector 4.88.3 → 4.88.4
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 +17 -0
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/lib/SyncDynamicWagmi.js +24 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.88.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.3...v4.88.4) (2026-06-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **wagmi-connector:** instrument ConnectorAlreadyConnectedError to quantify SyncDynamicWagmi race DYNT-549 ([#11513](https://github.com/dynamic-labs/dynamic-auth/issues/11513)) ([00a3278](https://github.com/dynamic-labs/dynamic-auth/commit/00a3278197fc8d8442e64af7373fc4f20e4e5a69)), closes [#11131](https://github.com/dynamic-labs/dynamic-auth/issues/11131) [#11496](https://github.com/dynamic-labs/dynamic-auth/issues/11496)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **ci:** show unreleased changes in bump-version release review summary ([#11484](https://github.com/dynamic-labs/dynamic-auth/issues/11484)) ([3e1c3d1](https://github.com/dynamic-labs/dynamic-auth/commit/3e1c3d12d66e0d94cb430d66ccfbffe3abdbd6ba))
|
|
13
|
+
* **release:** surface perf and revert commits in generated changelog ([#11507](https://github.com/dynamic-labs/dynamic-auth/issues/11507)) ([8efa0d9](https://github.com/dynamic-labs/dynamic-auth/commit/8efa0d95ab320480fcaf970a24bba35892b0fc99))
|
|
14
|
+
* remediate critical shell-quote vulnerability (CVE-2026-9277) + bump @dynamic-labs-sdk/client to 1.8.1 ([#11527](https://github.com/dynamic-labs/dynamic-auth/issues/11527)) ([c056df6](https://github.com/dynamic-labs/dynamic-auth/commit/c056df653f99992c9b333078ba13651e61826ab5))
|
|
15
|
+
* remediate high-severity vite vulnerability (CVE-2024-52011) ([#11509](https://github.com/dynamic-labs/dynamic-auth/issues/11509)) ([7c43b4e](https://github.com/dynamic-labs/dynamic-auth/commit/7c43b4e736c68da7de8789f1d44964778306abbf))
|
|
16
|
+
* support plain EOA transactions for 7702 smart wallets via viem extension ([#11525](https://github.com/dynamic-labs/dynamic-auth/issues/11525)) ([ce8542f](https://github.com/dynamic-labs/dynamic-auth/commit/ce8542fa40b4227759bcf2ca243b4bc313018b50))
|
|
17
|
+
* **wagmi-connector:** propagate external wagmi disconnect to Dynamic via handleLogOut ([#11496](https://github.com/dynamic-labs/dynamic-auth/issues/11496)) ([1b19565](https://github.com/dynamic-labs/dynamic-auth/commit/1b195657b9210da233480dda143fb92b39998962))
|
|
18
|
+
|
|
2
19
|
### [4.88.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.88.2...v4.88.3) (2026-06-09)
|
|
3
20
|
|
|
4
21
|
|
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wagmi-connector",
|
|
3
|
-
"version": "4.88.
|
|
3
|
+
"version": "4.88.4",
|
|
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.88.
|
|
10
|
-
"@dynamic-labs/ethereum-core": "4.88.
|
|
11
|
-
"@dynamic-labs/logger": "4.88.
|
|
12
|
-
"@dynamic-labs/rpc-providers": "4.88.
|
|
13
|
-
"@dynamic-labs/sdk-react-core": "4.88.
|
|
14
|
-
"@dynamic-labs/types": "4.88.
|
|
15
|
-
"@dynamic-labs/wallet-connector-core": "4.88.
|
|
9
|
+
"@dynamic-labs/assert-package-version": "4.88.4",
|
|
10
|
+
"@dynamic-labs/ethereum-core": "4.88.4",
|
|
11
|
+
"@dynamic-labs/logger": "4.88.4",
|
|
12
|
+
"@dynamic-labs/rpc-providers": "4.88.4",
|
|
13
|
+
"@dynamic-labs/sdk-react-core": "4.88.4",
|
|
14
|
+
"@dynamic-labs/types": "4.88.4",
|
|
15
|
+
"@dynamic-labs/wallet-connector-core": "4.88.4",
|
|
16
16
|
"eventemitter3": "5.0.1"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
@@ -2,16 +2,37 @@
|
|
|
2
2
|
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
3
3
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { useRef, useCallback, useEffect } from 'react';
|
|
5
|
-
import { useConfig, useConnect, useDisconnect } from 'wagmi';
|
|
5
|
+
import { useConfig, useConnect, ConnectorAlreadyConnectedError, useDisconnect } from 'wagmi';
|
|
6
6
|
import { useWalletConnectorEvent } from '@dynamic-labs/sdk-react-core';
|
|
7
7
|
import { logger } from '@dynamic-labs/wallet-connector-core';
|
|
8
8
|
|
|
9
|
+
const RACE_INSTRUMENT_KEY = 'wagmi-connector.connect_already_connected_race';
|
|
9
10
|
const SyncDynamicWagmi = ({ children, connector, wallet, }) => {
|
|
10
11
|
const { state: { status: clientStatus }, } = useConfig();
|
|
11
|
-
const { connect } = useConnect();
|
|
12
|
-
const { disconnect } = useDisconnect();
|
|
13
12
|
const lastConnectedWalletId = useRef(undefined);
|
|
14
13
|
const hasPreviousConnection = Boolean(lastConnectedWalletId.current);
|
|
14
|
+
const { connect } = useConnect({
|
|
15
|
+
mutation: {
|
|
16
|
+
onError: (error) => {
|
|
17
|
+
// sync()'s disconnect()+connect() pair races inside wagmi v2:
|
|
18
|
+
// disconnect awaits connector.disconnect() before deleting from
|
|
19
|
+
// `connections`, while connect's sync `connector.uid ===
|
|
20
|
+
// state.current` check throws ConnectorAlreadyConnectedError before
|
|
21
|
+
// disconnect resolves. wagmi ends disconnected with no automatic
|
|
22
|
+
// recovery; PR #11496 turns that into a silent handleLogOut(). No
|
|
23
|
+
// existing log key surfaces this — this counter quantifies it in
|
|
24
|
+
// prod so we know whether a fix is needed and whether it landed.
|
|
25
|
+
if (error instanceof ConnectorAlreadyConnectedError) {
|
|
26
|
+
logger.instrument(RACE_INSTRUMENT_KEY, {
|
|
27
|
+
key: RACE_INSTRUMENT_KEY,
|
|
28
|
+
lastConnectedWalletId: lastConnectedWalletId.current,
|
|
29
|
+
time: 0,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
const { disconnect } = useDisconnect();
|
|
15
36
|
const disconnectWagmi = useCallback(() => {
|
|
16
37
|
logger.logVerboseTroubleshootingMessage('[SyncDynamicWagmi] disconnecting wagmi - previous status: ', {
|
|
17
38
|
clientStatus,
|