@dynamic-labs/wagmi-connector 0.19.0-alpha.3 → 0.19.0-alpha.5

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,25 @@
1
1
 
2
+ ## [0.19.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.4...v0.19.0-alpha.5) (2023-08-24)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * send wagmi settings only once when DynamicWagmiConnector loads ([#3103](https://github.com/dynamic-labs/DynamicAuth/issues/3103)) ([8bba505](https://github.com/dynamic-labs/DynamicAuth/commit/8bba505f84f6f3567743397a3f1274a3840a7700))
8
+
9
+ ## [0.19.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.3...v0.19.0-alpha.4) (2023-08-23)
10
+
11
+
12
+ ### Features
13
+
14
+ * **GVTY-142:** support both emailOnly and dynamic as login with email provider ([#3025](https://github.com/dynamic-labs/DynamicAuth/issues/3025)) ([a4c43d3](https://github.com/dynamic-labs/DynamicAuth/commit/a4c43d36c44026df747530bc60193e73b77b9020))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * jumps when entering OTP code on IOS ([#3036](https://github.com/dynamic-labs/DynamicAuth/issues/3036)) ([f87eade](https://github.com/dynamic-labs/DynamicAuth/commit/f87eadeab9b7ea0c3f55d5d6d682a916868f2a58))
20
+ * log user out when magic session expires ([#3085](https://github.com/dynamic-labs/DynamicAuth/issues/3085)) ([fd5a328](https://github.com/dynamic-labs/DynamicAuth/commit/fd5a328dc41074c05413e0da82e82bb41bc803a1))
21
+ * switching network after connecting L1 wallet breaks bridge flow ([#3054](https://github.com/dynamic-labs/DynamicAuth/issues/3054)) ([e119f2b](https://github.com/dynamic-labs/DynamicAuth/commit/e119f2b23f3e6eedb0d2798dcf025bd401d78002))
22
+
2
23
  ## [0.19.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.2...v0.19.0-alpha.3) (2023-08-22)
3
24
 
4
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "0.19.0-alpha.3",
3
+ "version": "0.19.0-alpha.5",
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
  "ethers": "5.7.2",
13
13
  "wagmi": "~0.12.13",
14
- "@dynamic-labs/sdk-react-core": "0.19.0-alpha.3",
15
- "@dynamic-labs/types": "0.19.0-alpha.3",
14
+ "@dynamic-labs/sdk-react-core": "0.19.0-alpha.5",
15
+ "@dynamic-labs/types": "0.19.0-alpha.5",
16
16
  "eventemitter3": "5.0.1"
17
17
  },
18
18
  "license": "MIT",
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useEffect } from 'react';
2
2
  import { configureChains, mainnet, createClient, WagmiConfig } from 'wagmi';
3
3
  import { publicProvider } from 'wagmi/providers/public';
4
4
  import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
@@ -21,9 +21,13 @@ const DynamicWagmiConnector = ({ evmNetworks: customerSuppliedEvmNetworks, child
21
21
  var _a;
22
22
  const { networkConfigurations, handleLogOut, connectedWallets, linkedWallets, authMode, sendWagmiSettings, } = useDynamicContext();
23
23
  const wallets = authMode === 'connect-only' ? connectedWallets : linkedWallets;
24
- sendWagmiSettings({
25
- dynamicWagmiSettings: customerSuppliedEvmNetworks,
26
- });
24
+ useEffect(() => {
25
+ // only send wagmi settings once, when the first time DynamicWagmiConnector renders
26
+ sendWagmiSettings({
27
+ dynamicWagmiSettings: customerSuppliedEvmNetworks,
28
+ });
29
+ // eslint-disable-next-line react-hooks/exhaustive-deps
30
+ }, []);
27
31
  const evmNetworks = ((_a = customerSuppliedEvmNetworks !== null && customerSuppliedEvmNetworks !== void 0 ? customerSuppliedEvmNetworks : networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) !== null && _a !== void 0 ? _a : []).map((network) => {
28
32
  network.chainId = parseInt(network.chainId.toString());
29
33
  return network;