@dynamic-labs/wagmi-connector 1.0.0-alpha.8 → 1.0.0

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,73 @@
1
1
 
2
+ ## [1.0.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.14...v1.0.0) (2023-12-12)
3
+
4
+ Changelog: https://docs.dynamic.xyz/changelog/v1
5
+ Upgrade guide: https://docs.dynamic.xyz/react-sdk/upgrade
6
+
7
+
8
+ ## [1.0.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2023-12-12)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add user_media scope to instagram ([#4144](https://github.com/dynamic-labs/DynamicAuth/issues/4144)) ([57b9140](https://github.com/dynamic-labs/DynamicAuth/commit/57b91400cae7287157988cd6dfe7f30aeced10de))
14
+ * enable buy button onramp even with pregenerated wallets ([#4135](https://github.com/dynamic-labs/DynamicAuth/issues/4135)) ([fd94ecd](https://github.com/dynamic-labs/DynamicAuth/commit/fd94ecdcbe7190dc9abeb829cdcd933561afdd77))
15
+ * make the pin input fields responsive ([#4140](https://github.com/dynamic-labs/DynamicAuth/issues/4140)) ([4244744](https://github.com/dynamic-labs/DynamicAuth/commit/42447445ec32a3bca48a48d001c24dcd5b5cf004))
16
+
17
+ ## [1.0.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2023-12-12)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * embedded wallet connected flag not picking up ([#4128](https://github.com/dynamic-labs/DynamicAuth/issues/4128)) ([c6fbb1d](https://github.com/dynamic-labs/DynamicAuth/commit/c6fbb1de2027b186a4277a75545fd66d0d11ba95))
23
+
24
+ ## [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)
25
+
26
+
27
+ ### Features
28
+
29
+ * add useFunding hook ([#4098](https://github.com/dynamic-labs/DynamicAuth/issues/4098)) ([27424ab](https://github.com/dynamic-labs/DynamicAuth/commit/27424ab1a15202ee2b7c73c8a19f11e480e1794a))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * 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))
35
+
36
+ ## [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)
37
+
38
+ ## [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)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * allow transaction error to read from viem error ([#4101](https://github.com/dynamic-labs/DynamicAuth/issues/4101)) ([0f46cbe](https://github.com/dynamic-labs/DynamicAuth/commit/0f46cbea1eb260c2efdeee9b62f669fb3cf4ab93))
44
+ * trigger claim flow for unclaimed embedded smart contract wallet signer ([#4108](https://github.com/dynamic-labs/DynamicAuth/issues/4108)) ([37c9013](https://github.com/dynamic-labs/DynamicAuth/commit/37c9013109f2d6a37bde041da9072c5f5fa2df67))
45
+ * WalletConnect v2 connector with non active chains ([#4085](https://github.com/dynamic-labs/DynamicAuth/issues/4085)) ([f69cbe9](https://github.com/dynamic-labs/DynamicAuth/commit/f69cbe96012563f71e89939c96f2a46926e7b394))
46
+
47
+ ## [1.0.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2023-12-07)
48
+
49
+
50
+ ### ⚠ BREAKING CHANGES
51
+
52
+ * how to migrate
53
+ Whenever you would use the property wallets from the object returned by useDynamicContext, you must now rename it to walletConnectorOptions.
54
+
55
+ ### Features
56
+
57
+ * add support for eip6963 ([#4064](https://github.com/dynamic-labs/DynamicAuth/issues/4064)) ([3f8cf0e](https://github.com/dynamic-labs/DynamicAuth/commit/3f8cf0e4250945f3a331f701d491a308fab5f7b8))
58
+ * allow AA wallets to access owner features ([#4079](https://github.com/dynamic-labs/DynamicAuth/issues/4079)) ([9efc2be](https://github.com/dynamic-labs/DynamicAuth/commit/9efc2bee87ec9193c3682863d72024b3586de724))
59
+ * introduce UserWalletsContext ([#4083](https://github.com/dynamic-labs/DynamicAuth/issues/4083)) ([b9ca7f6](https://github.com/dynamic-labs/DynamicAuth/commit/b9ca7f6b0aff4b3992325b70cc9a903ece445c7f))
60
+
61
+
62
+ ### Bug Fixes
63
+
64
+ * ensure zero dev provider will receive a signer ([#4084](https://github.com/dynamic-labs/DynamicAuth/issues/4084)) ([f02a540](https://github.com/dynamic-labs/DynamicAuth/commit/f02a54036d39bfc5fb0c262f292acf914e4bd653))
65
+ * render recovery section only when turnkey provider is enabled ([#4093](https://github.com/dynamic-labs/DynamicAuth/issues/4093)) ([5f29bd2](https://github.com/dynamic-labs/DynamicAuth/commit/5f29bd23ccca2e307822377be28396edc7ab1fda))
66
+ * reset selected social provider on logout ([#4078](https://github.com/dynamic-labs/DynamicAuth/issues/4078)) ([85dc611](https://github.com/dynamic-labs/DynamicAuth/commit/85dc611d9c0e733bdb9d316b008bdaa35bcc2a91))
67
+
68
+
69
+ * rename wallets > walletConnectorOptions ([#4086](https://github.com/dynamic-labs/DynamicAuth/issues/4086)) ([10a7795](https://github.com/dynamic-labs/DynamicAuth/commit/10a779567e751469a667095726da52d78facbd57))
70
+
2
71
  ## [1.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2023-12-05)
3
72
 
4
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0",
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.8",
15
- "@dynamic-labs/sdk-react-core": "1.0.0-alpha.8",
16
- "@dynamic-labs/types": "1.0.0-alpha.8",
17
- "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.8",
14
+ "@dynamic-labs/rpc-providers": "1.0.0",
15
+ "@dynamic-labs/sdk-react-core": "1.0.0",
16
+ "@dynamic-labs/types": "1.0.0",
17
+ "@dynamic-labs/wallet-connector-core": "1.0.0",
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({