@dynamic-labs/wagmi-connector 0.19.0-alpha.13 → 0.19.0-alpha.15

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 CHANGED
@@ -1,4 +1,32 @@
1
1
 
2
+ ## [0.19.0-alpha.15](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.14...v0.19.0-alpha.15) (2023-10-11)
3
+
4
+ ## [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)
5
+
6
+
7
+ ### ⚠ BREAKING CHANGES
8
+
9
+ * remove numberOfWallets (#3521)
10
+
11
+ ### Features
12
+
13
+ * add embedded widget components ([#3533](https://github.com/dynamic-labs/DynamicAuth/issues/3533)) ([513cba8](https://github.com/dynamic-labs/DynamicAuth/commit/513cba8e7694544122ff9cce3aa1aea0a0c23986))
14
+ * 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))
15
+ * add switch network for turnkey wallets ([#3539](https://github.com/dynamic-labs/DynamicAuth/issues/3539)) ([1bcbbb2](https://github.com/dynamic-labs/DynamicAuth/commit/1bcbbb2bd4e333d47ce4c93d4bd4b1f29a80c1f4))
16
+ * editable copy for switch network view ([#3561](https://github.com/dynamic-labs/DynamicAuth/issues/3561)) ([4dea2f1](https://github.com/dynamic-labs/DynamicAuth/commit/4dea2f159ee0675d5b9ba1cb412d75e5e211b3d1))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * 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))
22
+ * 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))
23
+ * embedded widget rerender bug ([#3545](https://github.com/dynamic-labs/DynamicAuth/issues/3545)) ([27ed979](https://github.com/dynamic-labs/DynamicAuth/commit/27ed979618ac7d9e912381faebbf61ec9e9e839c))
24
+ * sync passkey should not throw error ([#3535](https://github.com/dynamic-labs/DynamicAuth/issues/3535)) ([0336ba6](https://github.com/dynamic-labs/DynamicAuth/commit/0336ba65bf1cc4394e4f005f273baea26326784a))
25
+ * 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))
26
+
27
+
28
+ * remove numberOfWallets ([#3521](https://github.com/dynamic-labs/DynamicAuth/issues/3521)) ([0174297](https://github.com/dynamic-labs/DynamicAuth/commit/017429745d08b7b1edc23bc4da43bc01b4ef1cd4))
29
+
2
30
  ## [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)
3
31
 
4
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "0.19.0-alpha.13",
3
+ "version": "0.19.0-alpha.15",
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.13",
15
- "@dynamic-labs/types": "0.19.0-alpha.13",
14
+ "@dynamic-labs/sdk-react-core": "0.19.0-alpha.15",
15
+ "@dynamic-labs/types": "0.19.0-alpha.15",
16
16
  "eventemitter3": "5.0.1"
17
17
  },
18
18
  "license": "MIT",
@@ -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({
@@ -40,7 +41,7 @@ const DynamicWagmiConnector = ({ evmNetworks: customerSuppliedEvmNetworks, child
40
41
  config.setWebSocketPublicClient(webSocketPublicClient);
41
42
  return chains;
42
43
  }, [customerSuppliedEvmNetworks, networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm]);
43
- connector = getConnector(connectedWallets, (wallet) => new Connector({
44
+ connector = getConnector(wallets, (wallet) => new Connector({
44
45
  chains,
45
46
  handleLogOut,
46
47
  walletConnector: wallet.connector,