@dynamic-labs/wagmi-connector 1.0.0-alpha.10 → 1.0.0-alpha.12

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,18 @@
1
1
 
2
+ ## [1.0.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2023-12-11)
3
+
4
+
5
+ ### Features
6
+
7
+ * add useFunding hook ([#4098](https://github.com/dynamic-labs/DynamicAuth/issues/4098)) ([27424ab](https://github.com/dynamic-labs/DynamicAuth/commit/27424ab1a15202ee2b7c73c8a19f11e480e1794a))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * add primary color to the secure wallet text ([#4127](https://github.com/dynamic-labs/DynamicAuth/issues/4127)) ([7c642d0](https://github.com/dynamic-labs/DynamicAuth/commit/7c642d0385112289df52874bc5dd2eaa0e6cdf50))
13
+
14
+ ## [1.0.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2023-12-11)
15
+
2
16
  ## [1.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2023-12-08)
3
17
 
4
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -11,10 +11,10 @@
11
11
  "react": "^17.0.2 || ^18.0.0",
12
12
  "viem": "^1.1.0",
13
13
  "wagmi": "^1.2.0",
14
- "@dynamic-labs/rpc-providers": "1.0.0-alpha.10",
15
- "@dynamic-labs/sdk-react-core": "1.0.0-alpha.10",
16
- "@dynamic-labs/types": "1.0.0-alpha.10",
17
- "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.10",
14
+ "@dynamic-labs/rpc-providers": "1.0.0-alpha.12",
15
+ "@dynamic-labs/sdk-react-core": "1.0.0-alpha.12",
16
+ "@dynamic-labs/types": "1.0.0-alpha.12",
17
+ "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.12",
18
18
  "eventemitter3": "5.0.1"
19
19
  },
20
20
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useEffect, useMemo } from 'react';
2
2
  import { configureChains, mainnet, createConfig, WagmiConfig } from 'wagmi';
3
3
  import { publicProvider } from 'wagmi/providers/public';
4
- import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
4
+ import { useDynamicContext, useUserWallets } from '@dynamic-labs/sdk-react-core';
5
5
  import { Connector } from './Connector.js';
6
6
  import { getConnector } from './getConnector.js';
7
7
  import { getWagmiChainsFromDynamicChains } from './getWagmiChainsFromDynamicChains.js';
@@ -14,18 +14,13 @@ const config = createConfig({
14
14
  publicClient,
15
15
  });
16
16
  const DynamicWagmiConnector = ({ evmNetworks: customerSuppliedEvmNetworks, children, }) => {
17
- const { networkConfigurations, handleLogOut, connectedWallets, linkedWallets, authMode, sendWagmiSettings, } = useDynamicContext();
17
+ const { networkConfigurations, handleLogOut, sendWagmiSettings } = useDynamicContext();
18
18
  /**
19
19
  * This will prevent the wagmi Connector from calling handleLogOut when we are the ones calling disconnect
20
20
  * as a result of a handleLogOut call (see SyncDynamicWagmi), but will preserve the existing behavior for customers.
21
21
  */
22
22
  const preventWagmiSyncFromCallingLogout = useRef(false);
23
- /**
24
- * Linked wallets are only available on connect-and-sign mode and the connected wallets
25
- * are only available on connect-only mode, the wallet const represents the current available
26
- * wallets to be used when creating an wagmi connector
27
- */
28
- const wallets = authMode === 'connect-and-sign' ? linkedWallets : connectedWallets;
23
+ const wallets = useUserWallets();
29
24
  useEffect(() => {
30
25
  // only send wagmi settings once, when the first time DynamicWagmiConnector renders
31
26
  sendWagmiSettings({