@ant-design/web3-sui 1.1.3 → 1.2.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 +6 -1
- package/dist/esm/sui-provider/config-provider.d.ts +6 -0
- package/dist/esm/sui-provider/config-provider.js +2 -0
- package/dist/esm/sui-provider/index.d.ts +6 -0
- package/dist/esm/sui-provider/index.js +2 -0
- package/dist/lib/sui-provider/config-provider.d.ts +6 -0
- package/dist/lib/sui-provider/config-provider.js +2 -0
- package/dist/lib/sui-provider/index.d.ts +6 -0
- package/dist/lib/sui-provider/index.js +2 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
# @ant-design/web3-sui
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.2.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
|
|
|
@@ -10,5 +10,11 @@ export interface AntDesignWeb3ConfigProviderProps {
|
|
|
10
10
|
currentChain?: SuiChain;
|
|
11
11
|
sns?: boolean;
|
|
12
12
|
onCurrentChainChange: (network: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* If true, this provider's configuration will be ignored when merging with parent context.
|
|
15
|
+
* This is useful when you have multiple chain providers and want to switch between them
|
|
16
|
+
* without causing page flickering. Only the active provider should not have this flag set.
|
|
17
|
+
*/
|
|
18
|
+
ignoreConfig?: boolean;
|
|
13
19
|
}
|
|
14
20
|
export declare const AntDesignWeb3ConfigProvider: React.FC<React.PropsWithChildren<AntDesignWeb3ConfigProviderProps>>;
|
|
@@ -12,6 +12,7 @@ export const AntDesignWeb3ConfigProvider = ({
|
|
|
12
12
|
currentChain,
|
|
13
13
|
sns,
|
|
14
14
|
onCurrentChainChange,
|
|
15
|
+
ignoreConfig,
|
|
15
16
|
children
|
|
16
17
|
}) => {
|
|
17
18
|
const account = useCurrentAccount();
|
|
@@ -119,6 +120,7 @@ export const AntDesignWeb3ConfigProvider = ({
|
|
|
119
120
|
}
|
|
120
121
|
},
|
|
121
122
|
getNFTMetadata: getNFTMetadataFunc,
|
|
123
|
+
ignoreConfig: ignoreConfig,
|
|
122
124
|
children: children
|
|
123
125
|
});
|
|
124
126
|
};
|
|
@@ -12,5 +12,11 @@ export interface SuiWeb3ConfigProviderProps {
|
|
|
12
12
|
defaultNetwork?: string;
|
|
13
13
|
wallets?: WalletFactory[];
|
|
14
14
|
queryClient?: QueryClient;
|
|
15
|
+
/**
|
|
16
|
+
* If true, this provider's configuration will be ignored when merging with parent context.
|
|
17
|
+
* This is useful when you have multiple chain providers and want to switch between them
|
|
18
|
+
* without causing page flickering. Only the active provider should not have this flag set.
|
|
19
|
+
*/
|
|
20
|
+
ignoreConfig?: boolean;
|
|
15
21
|
}
|
|
16
22
|
export declare const SuiWeb3ConfigProvider: React.FC<React.PropsWithChildren<SuiWeb3ConfigProviderProps>>;
|
|
@@ -14,6 +14,7 @@ export const SuiWeb3ConfigProvider = ({
|
|
|
14
14
|
queryClient,
|
|
15
15
|
sns,
|
|
16
16
|
wallets,
|
|
17
|
+
ignoreConfig,
|
|
17
18
|
children
|
|
18
19
|
}) => {
|
|
19
20
|
const [network, setNetwork] = React.useState(defaultNetwork);
|
|
@@ -51,6 +52,7 @@ export const SuiWeb3ConfigProvider = ({
|
|
|
51
52
|
balance: balance,
|
|
52
53
|
sns: sns,
|
|
53
54
|
onCurrentChainChange: setNetwork,
|
|
55
|
+
ignoreConfig: ignoreConfig,
|
|
54
56
|
children: children
|
|
55
57
|
})
|
|
56
58
|
})
|
|
@@ -10,5 +10,11 @@ export interface AntDesignWeb3ConfigProviderProps {
|
|
|
10
10
|
currentChain?: SuiChain;
|
|
11
11
|
sns?: boolean;
|
|
12
12
|
onCurrentChainChange: (network: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* If true, this provider's configuration will be ignored when merging with parent context.
|
|
15
|
+
* This is useful when you have multiple chain providers and want to switch between them
|
|
16
|
+
* without causing page flickering. Only the active provider should not have this flag set.
|
|
17
|
+
*/
|
|
18
|
+
ignoreConfig?: boolean;
|
|
13
19
|
}
|
|
14
20
|
export declare const AntDesignWeb3ConfigProvider: React.FC<React.PropsWithChildren<AntDesignWeb3ConfigProviderProps>>;
|
|
@@ -20,6 +20,7 @@ const AntDesignWeb3ConfigProvider = ({
|
|
|
20
20
|
currentChain,
|
|
21
21
|
sns,
|
|
22
22
|
onCurrentChainChange,
|
|
23
|
+
ignoreConfig,
|
|
23
24
|
children
|
|
24
25
|
}) => {
|
|
25
26
|
const account = (0, _dappKit.useCurrentAccount)();
|
|
@@ -127,6 +128,7 @@ const AntDesignWeb3ConfigProvider = ({
|
|
|
127
128
|
}
|
|
128
129
|
},
|
|
129
130
|
getNFTMetadata: getNFTMetadataFunc,
|
|
131
|
+
ignoreConfig: ignoreConfig,
|
|
130
132
|
children: children
|
|
131
133
|
});
|
|
132
134
|
};
|
|
@@ -12,5 +12,11 @@ export interface SuiWeb3ConfigProviderProps {
|
|
|
12
12
|
defaultNetwork?: string;
|
|
13
13
|
wallets?: WalletFactory[];
|
|
14
14
|
queryClient?: QueryClient;
|
|
15
|
+
/**
|
|
16
|
+
* If true, this provider's configuration will be ignored when merging with parent context.
|
|
17
|
+
* This is useful when you have multiple chain providers and want to switch between them
|
|
18
|
+
* without causing page flickering. Only the active provider should not have this flag set.
|
|
19
|
+
*/
|
|
20
|
+
ignoreConfig?: boolean;
|
|
15
21
|
}
|
|
16
22
|
export declare const SuiWeb3ConfigProvider: React.FC<React.PropsWithChildren<SuiWeb3ConfigProviderProps>>;
|
|
@@ -22,6 +22,7 @@ const SuiWeb3ConfigProvider = ({
|
|
|
22
22
|
queryClient,
|
|
23
23
|
sns,
|
|
24
24
|
wallets,
|
|
25
|
+
ignoreConfig,
|
|
25
26
|
children
|
|
26
27
|
}) => {
|
|
27
28
|
const [network, setNetwork] = _react.default.useState(defaultNetwork);
|
|
@@ -59,6 +60,7 @@ const SuiWeb3ConfigProvider = ({
|
|
|
59
60
|
balance: balance,
|
|
60
61
|
sns: sns,
|
|
61
62
|
onCurrentChainChange: setNetwork,
|
|
63
|
+
ignoreConfig: ignoreConfig,
|
|
62
64
|
children: children
|
|
63
65
|
})
|
|
64
66
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/web3-sui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "dist/lib/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"typings": "dist/esm/index.d.ts",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"debug": "^4.4.0",
|
|
42
|
-
"@ant-design/web3-
|
|
43
|
-
"@ant-design/web3-
|
|
42
|
+
"@ant-design/web3-common": "1.22.0",
|
|
43
|
+
"@ant-design/web3-assets": "1.14.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@mysten/dapp-kit": "^0.14.50",
|