@dynamic-labs/wagmi-connector 0.18.0-RC.4 → 0.18.0-RC.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,24 @@
1
1
 
2
+ ## [0.18.0-RC.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.5...v0.18.0-RC.6) (2023-06-20)
3
+
4
+
5
+ ### Features
6
+
7
+ * add export keys option for magic wallets ([#2377](https://github.com/dynamic-labs/DynamicAuth/issues/2377)) ([6b40f53](https://github.com/dynamic-labs/DynamicAuth/commit/6b40f538f207691b54fe2f245ed6018c467b83fe))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * add polyfill for css layers ([#2386](https://github.com/dynamic-labs/DynamicAuth/issues/2386)) ([3d489f5](https://github.com/dynamic-labs/DynamicAuth/commit/3d489f59d676864134a94d031697e0f83fc0d742))
13
+
14
+ ## [0.18.0-RC.5](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.4...v0.18.0-RC.5) (2023-06-20)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * remove process variable declaration ([#2389](https://github.com/dynamic-labs/DynamicAuth/issues/2389)) ([3c05121](https://github.com/dynamic-labs/DynamicAuth/commit/3c05121473850444f2c8393fa6e98e10d58870bc))
20
+ * wallet book singleton class to initalize when walletBook is undefined ([#2392](https://github.com/dynamic-labs/DynamicAuth/issues/2392)) ([7e07137](https://github.com/dynamic-labs/DynamicAuth/commit/7e0713712321439ee48e0c9ec88fef8c9aecd9cf))
21
+
2
22
  ## [0.18.0-RC.4](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.3...v0.18.0-RC.4) (2023-06-20)
3
23
 
4
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "0.18.0-RC.4",
3
+ "version": "0.18.0-RC.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -11,9 +11,9 @@
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.18.0-RC.4",
15
- "@dynamic-labs/types": "0.18.0-RC.4",
16
- "@dynamic-labs/wallet-connector-core": "0.18.0-RC.4"
14
+ "@dynamic-labs/sdk-react-core": "0.18.0-RC.6",
15
+ "@dynamic-labs/types": "0.18.0-RC.6",
16
+ "@dynamic-labs/wallet-connector-core": "0.18.0-RC.6"
17
17
  },
18
18
  "license": "MIT",
19
19
  "main": "./src/index.cjs",
@@ -1,4 +1,5 @@
1
1
  import * as allChains from 'wagmi/chains';
2
+ import { resolveRpcUrlFromEvmNetworks } from '../utils/resolveRpcUrlFromEvmNetworks/resolveRpcUrlFromEvmNetworks.js';
2
3
 
3
4
  // eslint-disable-next-line import/no-namespace
4
5
  const findRpcProvider = (rpcUrls, privateCustomerRpcUrls, name) => {
@@ -22,12 +23,13 @@ const findRpcProvider = (rpcUrls, privateCustomerRpcUrls, name) => {
22
23
  };
23
24
  const mapDynamicChainToWagmi = (dynamicChain) => {
24
25
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
26
+ const rpcUrlResolved = resolveRpcUrlFromEvmNetworks(dynamicChain);
25
27
  const rpcUrls = {
26
28
  default: {
27
- http: dynamicChain.rpcUrls,
29
+ http: rpcUrlResolved,
28
30
  },
29
31
  public: {
30
- http: dynamicChain.rpcUrls,
32
+ http: rpcUrlResolved,
31
33
  },
32
34
  };
33
35
  const rpcUrlProviders = ['alchemy', 'infura'];
@@ -0,0 +1 @@
1
+ export * from './resolveRpcUrlFromEvmNetworks';
@@ -0,0 +1 @@
1
+ export { resolveRpcUrlFromEvmNetworks } from './resolveRpcUrlFromEvmNetworks';
@@ -0,0 +1,2 @@
1
+ import { WagmiEvmNetworks } from '../../types';
2
+ export declare const resolveRpcUrlFromEvmNetworks: (dynamicChain: WagmiEvmNetworks) => string[];
@@ -0,0 +1,9 @@
1
+ const mapCustomProviderOptionsToString = (rpcUrl) => (typeof rpcUrl === 'string' ? rpcUrl : rpcUrl.http);
2
+ const resolveRpcUrlFromEvmNetworks = (dynamicChain) => {
3
+ var _a;
4
+ const privateCustomerRpcUrls = (_a = dynamicChain.privateCustomerRpcUrls) !== null && _a !== void 0 ? _a : [];
5
+ const customerRpcUrls = privateCustomerRpcUrls.map(mapCustomProviderOptionsToString);
6
+ return customerRpcUrls.length ? customerRpcUrls : dynamicChain.rpcUrls;
7
+ };
8
+
9
+ export { resolveRpcUrlFromEvmNetworks };