@dynamic-labs/wagmi-connector 0.19.0-alpha.12 → 0.19.0-alpha.14
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 +42 -0
- package/package.json +4 -5
- package/src/lib/Connector.js +3 -0
- package/src/lib/DynamicWagmiConnector.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,46 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.19.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.13...v0.19.0-alpha.14) (2023-10-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* remove numberOfWallets (#3521)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add embedded widget components ([#3533](https://github.com/dynamic-labs/DynamicAuth/issues/3533)) ([513cba8](https://github.com/dynamic-labs/DynamicAuth/commit/513cba8e7694544122ff9cce3aa1aea0a0c23986))
|
|
12
|
+
* add ethers extension support to wallet-connectors ([#3544](https://github.com/dynamic-labs/DynamicAuth/issues/3544)) ([3c09ba5](https://github.com/dynamic-labs/DynamicAuth/commit/3c09ba58b0f2c745df60a87b1820abbbfc1b95b7))
|
|
13
|
+
* add switch network for turnkey wallets ([#3539](https://github.com/dynamic-labs/DynamicAuth/issues/3539)) ([1bcbbb2](https://github.com/dynamic-labs/DynamicAuth/commit/1bcbbb2bd4e333d47ce4c93d4bd4b1f29a80c1f4))
|
|
14
|
+
* editable copy for switch network view ([#3561](https://github.com/dynamic-labs/DynamicAuth/issues/3561)) ([4dea2f1](https://github.com/dynamic-labs/DynamicAuth/commit/4dea2f159ee0675d5b9ba1cb412d75e5e211b3d1))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* always call connectSucess callback after successfully connecting wallet ([#3562](https://github.com/dynamic-labs/DynamicAuth/issues/3562)) ([2587ff8](https://github.com/dynamic-labs/DynamicAuth/commit/2587ff8a915f61793b15bfa1289689514344fc75))
|
|
20
|
+
* don't let user update email if they have an embedded wallet ([#3552](https://github.com/dynamic-labs/DynamicAuth/issues/3552)) ([c710cce](https://github.com/dynamic-labs/DynamicAuth/commit/c710cce22c7a54004f56c8fc68f8c4075f5f9e51))
|
|
21
|
+
* embedded widget rerender bug ([#3545](https://github.com/dynamic-labs/DynamicAuth/issues/3545)) ([27ed979](https://github.com/dynamic-labs/DynamicAuth/commit/27ed979618ac7d9e912381faebbf61ec9e9e839c))
|
|
22
|
+
* sync passkey should not throw error ([#3535](https://github.com/dynamic-labs/DynamicAuth/issues/3535)) ([0336ba6](https://github.com/dynamic-labs/DynamicAuth/commit/0336ba65bf1cc4394e4f005f273baea26326784a))
|
|
23
|
+
* wrap eth wallet connector rpc calls in retry function ([#3497](https://github.com/dynamic-labs/DynamicAuth/issues/3497)) ([7800b45](https://github.com/dynamic-labs/DynamicAuth/commit/7800b45dc93f20731ee643e89e84d57765387778))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
* remove numberOfWallets ([#3521](https://github.com/dynamic-labs/DynamicAuth/issues/3521)) ([0174297](https://github.com/dynamic-labs/DynamicAuth/commit/017429745d08b7b1edc23bc4da43bc01b4ef1cd4))
|
|
27
|
+
|
|
28
|
+
## [0.19.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.12...v0.19.0-alpha.13) (2023-10-04)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* add ethers 5/6 util methods for converting connectors to ethers classes ([#3435](https://github.com/dynamic-labs/DynamicAuth/issues/3435)) ([5f4da48](https://github.com/dynamic-labs/DynamicAuth/commit/5f4da48526dbce4be2d437fc93f4cc8ddded73c5))
|
|
34
|
+
* show goerli icon on network button and a warning message ([#3494](https://github.com/dynamic-labs/DynamicAuth/issues/3494)) ([64851a3](https://github.com/dynamic-labs/DynamicAuth/commit/64851a3d60ba19dd164690dcb26056cad2d22e61))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* fix broken test ([#3520](https://github.com/dynamic-labs/DynamicAuth/issues/3520)) ([d7a3bd4](https://github.com/dynamic-labs/DynamicAuth/commit/d7a3bd4c71309a2df8106cae3f8f03f4aaedaa56))
|
|
40
|
+
* **handleWalletsToConnect:** require wallet connector in the props ([#3512](https://github.com/dynamic-labs/DynamicAuth/issues/3512)) ([ddc0d19](https://github.com/dynamic-labs/DynamicAuth/commit/ddc0d19c9996f4fd52d19aad837fdf1e632d1b3d))
|
|
41
|
+
* use providers redirect url in getOauthLoginUrl function ([#3519](https://github.com/dynamic-labs/DynamicAuth/issues/3519)) ([3f8601d](https://github.com/dynamic-labs/DynamicAuth/commit/3f8601d47d2fc6aa65f3a6890b1b9a4b93c9e9f6))
|
|
42
|
+
* **wagmi-connector:** set websocket rpc to wagmi client ([#3474](https://github.com/dynamic-labs/DynamicAuth/issues/3474)) ([c94a43e](https://github.com/dynamic-labs/DynamicAuth/commit/c94a43ea9be11352313eafb2cd42c5f4941562a3))
|
|
43
|
+
|
|
2
44
|
## [0.19.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.11...v0.19.0-alpha.12) (2023-10-03)
|
|
3
45
|
|
|
4
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wagmi-connector",
|
|
3
|
-
"version": "0.19.0-alpha.
|
|
3
|
+
"version": "0.19.0-alpha.14",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"react": "^17.0.2 || ^18.0.0",
|
|
12
12
|
"viem": "^1.1.0",
|
|
13
13
|
"wagmi": "^1.2.0",
|
|
14
|
-
"@dynamic-labs/sdk-react-core": "0.19.0-alpha.
|
|
15
|
-
"@dynamic-labs/types": "0.19.0-alpha.
|
|
14
|
+
"@dynamic-labs/sdk-react-core": "0.19.0-alpha.14",
|
|
15
|
+
"@dynamic-labs/types": "0.19.0-alpha.14",
|
|
16
16
|
"eventemitter3": "5.0.1"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
@@ -27,6 +27,5 @@
|
|
|
27
27
|
"require": "./src/index.cjs"
|
|
28
28
|
},
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
|
-
}
|
|
31
|
-
"dependencies": {}
|
|
30
|
+
}
|
|
32
31
|
}
|
package/src/lib/Connector.js
CHANGED
|
@@ -97,6 +97,9 @@ class Connector extends Connector$1 {
|
|
|
97
97
|
var _a;
|
|
98
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
99
|
const signer = yield ((_a = this.walletConnector) === null || _a === void 0 ? void 0 : _a.getSigner());
|
|
100
|
+
if (signer === null || signer === void 0 ? void 0 : signer.account) {
|
|
101
|
+
return signer;
|
|
102
|
+
}
|
|
100
103
|
return createWalletClient({
|
|
101
104
|
account: yield this.getAccount(),
|
|
102
105
|
transport: custom(signer),
|
|
@@ -19,7 +19,8 @@ const config = createConfig({
|
|
|
19
19
|
publicClient,
|
|
20
20
|
});
|
|
21
21
|
const DynamicWagmiConnector = ({ evmNetworks: customerSuppliedEvmNetworks, children, }) => {
|
|
22
|
-
const { networkConfigurations, handleLogOut, connectedWallets, sendWagmiSettings, } = useDynamicContext();
|
|
22
|
+
const { networkConfigurations, handleLogOut, connectedWallets, linkedWallets, sendWagmiSettings, authMode, } = useDynamicContext();
|
|
23
|
+
const wallets = authMode === 'connect-and-sign' ? linkedWallets : connectedWallets;
|
|
23
24
|
useEffect(() => {
|
|
24
25
|
// only send wagmi settings once, when the first time DynamicWagmiConnector renders
|
|
25
26
|
sendWagmiSettings({
|
|
@@ -35,11 +36,12 @@ const DynamicWagmiConnector = ({ evmNetworks: customerSuppliedEvmNetworks, child
|
|
|
35
36
|
});
|
|
36
37
|
const mappedChains = getWagmiChainsFromDynamicChains(evmNetworks);
|
|
37
38
|
const mappedProviders = getWagmiProvidersFromDynamicChains(evmNetworks);
|
|
38
|
-
const { chains, publicClient } = configureChains(mappedChains, mappedProviders);
|
|
39
|
+
const { chains, publicClient, webSocketPublicClient } = configureChains(mappedChains, mappedProviders);
|
|
39
40
|
config.setPublicClient(publicClient);
|
|
41
|
+
config.setWebSocketPublicClient(webSocketPublicClient);
|
|
40
42
|
return chains;
|
|
41
43
|
}, [customerSuppliedEvmNetworks, networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm]);
|
|
42
|
-
connector = getConnector(
|
|
44
|
+
connector = getConnector(wallets, (wallet) => new Connector({
|
|
43
45
|
chains,
|
|
44
46
|
handleLogOut,
|
|
45
47
|
walletConnector: wallet.connector,
|