@dynamic-labs/wagmi-connector 3.0.0-alpha.65 → 3.0.0-alpha.66
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
|
+
## [3.0.0-alpha.66](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.65...v3.0.0-alpha.66) (2024-09-11)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add new method to BitcoinWallet to sign message with a specific address type ([#6861](https://github.com/dynamic-labs/DynamicAuth/issues/6861)) ([9284648](https://github.com/dynamic-labs/DynamicAuth/commit/92846488b4d60a498374dd60c4a0be3ab87e4e68))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* fix ethers-v6 exports ([#6863](https://github.com/dynamic-labs/DynamicAuth/issues/6863)) ([27a1aab](https://github.com/dynamic-labs/DynamicAuth/commit/27a1aabe6c5e6ed2501200f435b2cb5110836986))
|
|
13
|
+
* stop infinite rerendering when wagmi config error is thrown ([#6862](https://github.com/dynamic-labs/DynamicAuth/issues/6862)) ([9b2fac0](https://github.com/dynamic-labs/DynamicAuth/commit/9b2fac0a570246f4663057c1ff6c82a1adca64c6))
|
|
14
|
+
* update react-native packages to include correct dependencies ([#6859](https://github.com/dynamic-labs/DynamicAuth/issues/6859)) ([a6f6c1c](https://github.com/dynamic-labs/DynamicAuth/commit/a6f6c1c750d2d6916a94183059369e208ec9afa5))
|
|
15
|
+
|
|
2
16
|
## [3.0.0-alpha.65](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.64...v3.0.0-alpha.65) (2024-09-11)
|
|
3
17
|
|
|
4
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wagmi-connector",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.66",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"react": "^18.0.0",
|
|
12
12
|
"viem": "^2.7.6",
|
|
13
13
|
"wagmi": "^2.5.7",
|
|
14
|
-
"@dynamic-labs/ethereum-core": "3.0.0-alpha.
|
|
15
|
-
"@dynamic-labs/logger": "3.0.0-alpha.
|
|
16
|
-
"@dynamic-labs/rpc-providers": "3.0.0-alpha.
|
|
17
|
-
"@dynamic-labs/sdk-react-core": "3.0.0-alpha.
|
|
18
|
-
"@dynamic-labs/types": "3.0.0-alpha.
|
|
19
|
-
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.
|
|
14
|
+
"@dynamic-labs/ethereum-core": "3.0.0-alpha.66",
|
|
15
|
+
"@dynamic-labs/logger": "3.0.0-alpha.66",
|
|
16
|
+
"@dynamic-labs/rpc-providers": "3.0.0-alpha.66",
|
|
17
|
+
"@dynamic-labs/sdk-react-core": "3.0.0-alpha.66",
|
|
18
|
+
"@dynamic-labs/types": "3.0.0-alpha.66",
|
|
19
|
+
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.66",
|
|
20
20
|
"eventemitter3": "5.0.1"
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@ const getEvmWallet = (wallet) => {
|
|
|
19
19
|
const DynamicWagmiConnectorInner = ({ suppressChainMismatchError = false, children }) => {
|
|
20
20
|
const config = useConfig();
|
|
21
21
|
const { primaryWallet } = useDynamicContext();
|
|
22
|
-
useChainMismatchLogger({
|
|
22
|
+
useChainMismatchLogger({ suppress: suppressChainMismatchError });
|
|
23
23
|
const evmWallet = getEvmWallet(primaryWallet);
|
|
24
24
|
const getConnectorId = useConnectorId();
|
|
25
25
|
const connector = useMemo(() => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useChainMismatchLogger: ({
|
|
2
|
-
|
|
1
|
+
export declare const useChainMismatchLogger: ({ suppress, }?: {
|
|
2
|
+
suppress: boolean;
|
|
3
3
|
}) => void;
|
|
@@ -5,11 +5,11 @@ import { Logger } from '@dynamic-labs/logger';
|
|
|
5
5
|
import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
|
|
6
6
|
|
|
7
7
|
const logger = new Logger('DynamicWagmiConnector');
|
|
8
|
-
const useChainMismatchLogger = ({
|
|
8
|
+
const useChainMismatchLogger = ({ suppress, } = { suppress: false }) => {
|
|
9
9
|
const config = useConfig();
|
|
10
10
|
const { networkConfigurations } = useDynamicContext();
|
|
11
11
|
useEffect(() => {
|
|
12
|
-
if (!(networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm))
|
|
12
|
+
if (!(networkConfigurations === null || networkConfigurations === void 0 ? void 0 : networkConfigurations.evm) || suppress)
|
|
13
13
|
return;
|
|
14
14
|
const wagmiChains = config.chains;
|
|
15
15
|
const wagmiChainIds = wagmiChains.map((chain) => chain.id);
|
|
@@ -20,10 +20,6 @@ const useChainMismatchLogger = ({ throwOnMismatch, } = { throwOnMismatch: true }
|
|
|
20
20
|
const message = `Chain (id: ${chain.id} name: ${chain.name}) is present in the Wagmi config, but is not present in the Dynamic configuration.` +
|
|
21
21
|
' Please make sure to enable the chain in your Dynamic Dashboard, or add it to the evmNetworks prop on DynamicContextProvider.' +
|
|
22
22
|
' For more information, see: https://docs.dynamic.xyz/guides/frameworks/wagmi-v2#chain-configuration';
|
|
23
|
-
if (throwOnMismatch) {
|
|
24
|
-
throw new Error(message +
|
|
25
|
-
' \n\nTo suppress this error, pass `suppressChainMismatchError` to `DynamicWagmiConnector`: `<DynamicWagmiConnector suppressChainMismatchError>`');
|
|
26
|
-
}
|
|
27
23
|
logger.warn(message);
|
|
28
24
|
}
|
|
29
25
|
});
|
|
@@ -32,14 +28,10 @@ const useChainMismatchLogger = ({ throwOnMismatch, } = { throwOnMismatch: true }
|
|
|
32
28
|
const message = `Chain (id: ${chain.chainId} name: ${chain.name}) is present in the Dynamic config, but is not present in the Wagmi configuration.` +
|
|
33
29
|
' Please make sure to add the chain to the chains prop on the Wagmi createConfig function.' +
|
|
34
30
|
' For more information, see: https://docs.dynamic.xyz/guides/frameworks/wagmi-v2#chain-configuration';
|
|
35
|
-
if (throwOnMismatch) {
|
|
36
|
-
throw new Error(message +
|
|
37
|
-
' \n\nTo suppress this error, pass `suppressChainMismatchError` to `DynamicWagmiConnector`: `<DynamicWagmiConnector suppressChainMismatchError>`');
|
|
38
|
-
}
|
|
39
31
|
logger.warn(message);
|
|
40
32
|
}
|
|
41
33
|
});
|
|
42
|
-
}, [config.chains, networkConfigurations,
|
|
34
|
+
}, [config.chains, networkConfigurations, suppress]);
|
|
43
35
|
};
|
|
44
36
|
|
|
45
37
|
export { useChainMismatchLogger };
|