@dynamic-labs/wagmi-connector 0.19.0-alpha.4 → 0.19.0-alpha.6

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,27 @@
1
1
 
2
+ ## [0.19.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.5...v0.19.0-alpha.6) (2023-08-25)
3
+
4
+
5
+ ### Features
6
+
7
+ * optionally split up email and social and change their display order in login view ([#3125](https://github.com/dynamic-labs/DynamicAuth/issues/3125)) ([ee82d26](https://github.com/dynamic-labs/DynamicAuth/commit/ee82d264eb3cb7f4ca7eb33369ef5409fe6860e4))
8
+ * post a connection request for second wallet ([#3113](https://github.com/dynamic-labs/DynamicAuth/issues/3113)) ([630aefa](https://github.com/dynamic-labs/DynamicAuth/commit/630aefa5ce83278082db1e3cd419c03e4fd081c7))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix bug where user was not able to confirm last wallet transfer ([#3102](https://github.com/dynamic-labs/DynamicAuth/issues/3102)) ([453b4c2](https://github.com/dynamic-labs/DynamicAuth/commit/453b4c20ea8f09d92dda11cdf92ddab562096d6f))
14
+ * fix github social linking icon on dark mode ([#3126](https://github.com/dynamic-labs/DynamicAuth/issues/3126)) ([6a8f3e3](https://github.com/dynamic-labs/DynamicAuth/commit/6a8f3e3d6e43d76b428e169fd5ead9ee0e2ec43d))
15
+ * fix issue with detecting oauth window closed before finishing linking ([#3124](https://github.com/dynamic-labs/DynamicAuth/issues/3124)) ([6a80ee9](https://github.com/dynamic-labs/DynamicAuth/commit/6a80ee97deb54e5b62bf2285d71b03c36802c5d2))
16
+ * stop calling handleLogOut prematurely ([#3135](https://github.com/dynamic-labs/DynamicAuth/issues/3135)) ([e7c81ad](https://github.com/dynamic-labs/DynamicAuth/commit/e7c81ad7e9e9cff03e5d2ca1e0fb7cfea083d06e))
17
+
18
+ ## [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)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * 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))
24
+
2
25
  ## [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)
3
26
 
4
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "0.19.0-alpha.4",
3
+ "version": "0.19.0-alpha.6",
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.4",
15
- "@dynamic-labs/types": "0.19.0-alpha.4",
14
+ "@dynamic-labs/sdk-react-core": "0.19.0-alpha.6",
15
+ "@dynamic-labs/types": "0.19.0-alpha.6",
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;