@ant-design/web3-wagmi 2.12.3 → 2.13.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,10 +1,15 @@
1
1
  # @ant-design/web3-wagmi
2
2
 
3
- ## 2.12.3
3
+ ## 2.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2ae483c: feat: support ignoreConfig for support multiple chain better
4
8
 
5
9
  ### Patch Changes
6
10
 
7
11
  - Updated dependencies [dfa67c5]
12
+ - Updated dependencies [2ae483c]
8
13
  - @ant-design/web3-common@1.22.0
9
14
  - @ant-design/web3-assets@1.14.3
10
15
 
@@ -13,5 +13,11 @@ export interface AntDesignWeb3ConfigProviderProps {
13
13
  wagimConfig: WagmiConfig;
14
14
  useWalletConnectOfficialModal?: boolean;
15
15
  siwe?: SIWEConfig;
16
+ /**
17
+ * If true, this provider's configuration will be ignored when merging with parent context.
18
+ * This is useful when you have multiple chain providers and want to switch between them
19
+ * without causing page flickering. Only the active provider should not have this flag set.
20
+ */
21
+ ignoreConfig?: boolean;
16
22
  }
17
23
  export declare const AntDesignWeb3ConfigProvider: React.FC<AntDesignWeb3ConfigProviderProps>;
@@ -18,7 +18,8 @@ export const AntDesignWeb3ConfigProvider = props => {
18
18
  eip6963,
19
19
  wagimConfig,
20
20
  useWalletConnectOfficialModal,
21
- siwe
21
+ siwe,
22
+ ignoreConfig
22
23
  } = props;
23
24
  const {
24
25
  address,
@@ -236,6 +237,7 @@ export const AntDesignWeb3ConfigProvider = props => {
236
237
  }
237
238
  },
238
239
  getNFTMetadata: getNFTMetadataFunc,
240
+ ignoreConfig: ignoreConfig,
239
241
  children: children
240
242
  });
241
243
  };
@@ -22,5 +22,11 @@ export interface WagmiWeb3ConfigProviderProps {
22
22
  walletConnect?: false | WalletConnectOptions;
23
23
  transports?: Record<number, Transport>;
24
24
  siwe?: SIWEConfig;
25
+ /**
26
+ * If true, this provider's configuration will be ignored when merging with parent context.
27
+ * This is useful when you have multiple chain providers and want to switch between them
28
+ * without causing page flickering. Only the active provider should not have this flag set.
29
+ */
30
+ ignoreConfig?: boolean;
25
31
  }
26
- export declare function WagmiWeb3ConfigProvider({ children, config, locale, wallets, chains, ens, queryClient, balance, eip6963, walletConnect, transports, siwe, ...restProps }: React.PropsWithChildren<WagmiWeb3ConfigProviderProps>): React.ReactElement;
32
+ export declare function WagmiWeb3ConfigProvider({ children, config, locale, wallets, chains, ens, queryClient, balance, eip6963, walletConnect, transports, siwe, ignoreConfig, ...restProps }: React.PropsWithChildren<WagmiWeb3ConfigProviderProps>): React.ReactElement;
@@ -20,6 +20,7 @@ export function WagmiWeb3ConfigProvider({
20
20
  walletConnect,
21
21
  transports,
22
22
  siwe,
23
+ ignoreConfig,
23
24
  ...restProps
24
25
  }) {
25
26
  // When user custom config, add Mainnet by default
@@ -93,6 +94,7 @@ export function WagmiWeb3ConfigProvider({
93
94
  eip6963: eip6963,
94
95
  wagimConfig: wagmiConfig,
95
96
  useWalletConnectOfficialModal: typeof walletConnect === 'object' && walletConnect?.useWalletConnectOfficialModal,
97
+ ignoreConfig: ignoreConfig,
96
98
  children: children
97
99
  })
98
100
  })
@@ -13,5 +13,11 @@ export interface AntDesignWeb3ConfigProviderProps {
13
13
  wagimConfig: WagmiConfig;
14
14
  useWalletConnectOfficialModal?: boolean;
15
15
  siwe?: SIWEConfig;
16
+ /**
17
+ * If true, this provider's configuration will be ignored when merging with parent context.
18
+ * This is useful when you have multiple chain providers and want to switch between them
19
+ * without causing page flickering. Only the active provider should not have this flag set.
20
+ */
21
+ ignoreConfig?: boolean;
16
22
  }
17
23
  export declare const AntDesignWeb3ConfigProvider: React.FC<AntDesignWeb3ConfigProviderProps>;
@@ -25,7 +25,8 @@ const AntDesignWeb3ConfigProvider = props => {
25
25
  eip6963,
26
26
  wagimConfig,
27
27
  useWalletConnectOfficialModal,
28
- siwe
28
+ siwe,
29
+ ignoreConfig
29
30
  } = props;
30
31
  const {
31
32
  address,
@@ -243,6 +244,7 @@ const AntDesignWeb3ConfigProvider = props => {
243
244
  }
244
245
  },
245
246
  getNFTMetadata: getNFTMetadataFunc,
247
+ ignoreConfig: ignoreConfig,
246
248
  children: children
247
249
  });
248
250
  };
@@ -22,5 +22,11 @@ export interface WagmiWeb3ConfigProviderProps {
22
22
  walletConnect?: false | WalletConnectOptions;
23
23
  transports?: Record<number, Transport>;
24
24
  siwe?: SIWEConfig;
25
+ /**
26
+ * If true, this provider's configuration will be ignored when merging with parent context.
27
+ * This is useful when you have multiple chain providers and want to switch between them
28
+ * without causing page flickering. Only the active provider should not have this flag set.
29
+ */
30
+ ignoreConfig?: boolean;
25
31
  }
26
- export declare function WagmiWeb3ConfigProvider({ children, config, locale, wallets, chains, ens, queryClient, balance, eip6963, walletConnect, transports, siwe, ...restProps }: React.PropsWithChildren<WagmiWeb3ConfigProviderProps>): React.ReactElement;
32
+ export declare function WagmiWeb3ConfigProvider({ children, config, locale, wallets, chains, ens, queryClient, balance, eip6963, walletConnect, transports, siwe, ignoreConfig, ...restProps }: React.PropsWithChildren<WagmiWeb3ConfigProviderProps>): React.ReactElement;
@@ -28,6 +28,7 @@ function WagmiWeb3ConfigProvider({
28
28
  walletConnect,
29
29
  transports,
30
30
  siwe,
31
+ ignoreConfig,
31
32
  ...restProps
32
33
  }) {
33
34
  // When user custom config, add Mainnet by default
@@ -101,6 +102,7 @@ function WagmiWeb3ConfigProvider({
101
102
  eip6963: eip6963,
102
103
  wagimConfig: wagmiConfig,
103
104
  useWalletConnectOfficialModal: typeof walletConnect === 'object' && walletConnect?.useWalletConnectOfficialModal,
105
+ ignoreConfig: ignoreConfig,
104
106
  children: children
105
107
  })
106
108
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/web3-wagmi",
3
- "version": "2.12.3",
3
+ "version": "2.13.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",