@ant-design/web3-ton 1.1.5 → 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/ton-provider/TonWeb3ConfigProvider.d.ts +6 -0
- package/dist/esm/ton-provider/TonWeb3ConfigProvider.js +3 -1
- package/dist/esm/ton-provider/config-provider.d.ts +6 -0
- package/dist/esm/ton-provider/config-provider.js +3 -1
- package/dist/lib/ton-provider/TonWeb3ConfigProvider.d.ts +6 -0
- package/dist/lib/ton-provider/TonWeb3ConfigProvider.js +3 -1
- package/dist/lib/ton-provider/config-provider.d.ts +6 -0
- package/dist/lib/ton-provider/config-provider.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
# @ant-design/web3-ton
|
|
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
|
|
|
@@ -16,6 +16,12 @@ export interface TonWeb3ConfigProviderProps extends TonConnectOptions {
|
|
|
16
16
|
wallets: TonWalletMetadata[];
|
|
17
17
|
chain?: CHAIN;
|
|
18
18
|
reconnect?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If true, this provider's configuration will be ignored when merging with parent context.
|
|
21
|
+
* This is useful when you have multiple chain providers and want to switch between them
|
|
22
|
+
* without causing page flickering. Only the active provider should not have this flag set.
|
|
23
|
+
*/
|
|
24
|
+
ignoreConfig?: boolean;
|
|
19
25
|
}
|
|
20
26
|
export declare const TonWeb3ConfigProvider: React.FC<PropsWithChildren<TonWeb3ConfigProviderProps>>;
|
|
21
27
|
export {};
|
|
@@ -13,7 +13,8 @@ export const TonWeb3ConfigProvider = ({
|
|
|
13
13
|
locale,
|
|
14
14
|
wallets,
|
|
15
15
|
chain,
|
|
16
|
-
reconnect = true
|
|
16
|
+
reconnect = true,
|
|
17
|
+
ignoreConfig
|
|
17
18
|
} = restProps;
|
|
18
19
|
const [tonConnectSdk, setTonConnectSdk] = React.useState(null);
|
|
19
20
|
const [tonSelectWallet, setTonSelectWallet] = React.useState(null);
|
|
@@ -58,6 +59,7 @@ export const TonWeb3ConfigProvider = ({
|
|
|
58
59
|
wallets: tonWallets.map(w => TonWalletFactory(w).create()),
|
|
59
60
|
balance: balance,
|
|
60
61
|
locale: locale,
|
|
62
|
+
ignoreConfig: ignoreConfig,
|
|
61
63
|
children: children
|
|
62
64
|
})
|
|
63
65
|
});
|
|
@@ -3,6 +3,12 @@ import type { TonWallet } from '../wallets/type';
|
|
|
3
3
|
import type { TonWeb3ConfigProviderProps } from './TonWeb3ConfigProvider';
|
|
4
4
|
interface TonConfigProviderProps extends Omit<TonWeb3ConfigProviderProps, 'wallets' | 'connectConfig'> {
|
|
5
5
|
wallets?: TonWallet[];
|
|
6
|
+
/**
|
|
7
|
+
* If true, this provider's configuration will be ignored when merging with parent context.
|
|
8
|
+
* This is useful when you have multiple chain providers and want to switch between them
|
|
9
|
+
* without causing page flickering. Only the active provider should not have this flag set.
|
|
10
|
+
*/
|
|
11
|
+
ignoreConfig?: boolean;
|
|
6
12
|
}
|
|
7
13
|
declare const TonConfigProvider: React.FC<PropsWithChildren<TonConfigProviderProps>>;
|
|
8
14
|
export default TonConfigProvider;
|
|
@@ -8,7 +8,8 @@ const TonConfigProvider = ({
|
|
|
8
8
|
children,
|
|
9
9
|
locale,
|
|
10
10
|
balance: showBalance,
|
|
11
|
-
wallets
|
|
11
|
+
wallets,
|
|
12
|
+
ignoreConfig
|
|
12
13
|
}) => {
|
|
13
14
|
const {
|
|
14
15
|
connector,
|
|
@@ -55,6 +56,7 @@ const TonConfigProvider = ({
|
|
|
55
56
|
setTonSelectWallet?.(null);
|
|
56
57
|
}
|
|
57
58
|
},
|
|
59
|
+
ignoreConfig: ignoreConfig,
|
|
58
60
|
children: children
|
|
59
61
|
});
|
|
60
62
|
};
|
|
@@ -16,6 +16,12 @@ export interface TonWeb3ConfigProviderProps extends TonConnectOptions {
|
|
|
16
16
|
wallets: TonWalletMetadata[];
|
|
17
17
|
chain?: CHAIN;
|
|
18
18
|
reconnect?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If true, this provider's configuration will be ignored when merging with parent context.
|
|
21
|
+
* This is useful when you have multiple chain providers and want to switch between them
|
|
22
|
+
* without causing page flickering. Only the active provider should not have this flag set.
|
|
23
|
+
*/
|
|
24
|
+
ignoreConfig?: boolean;
|
|
19
25
|
}
|
|
20
26
|
export declare const TonWeb3ConfigProvider: React.FC<PropsWithChildren<TonWeb3ConfigProviderProps>>;
|
|
21
27
|
export {};
|
|
@@ -22,7 +22,8 @@ const TonWeb3ConfigProvider = ({
|
|
|
22
22
|
locale,
|
|
23
23
|
wallets,
|
|
24
24
|
chain,
|
|
25
|
-
reconnect = true
|
|
25
|
+
reconnect = true,
|
|
26
|
+
ignoreConfig
|
|
26
27
|
} = restProps;
|
|
27
28
|
const [tonConnectSdk, setTonConnectSdk] = _react.default.useState(null);
|
|
28
29
|
const [tonSelectWallet, setTonSelectWallet] = _react.default.useState(null);
|
|
@@ -67,6 +68,7 @@ const TonWeb3ConfigProvider = ({
|
|
|
67
68
|
wallets: tonWallets.map(w => (0, _factory.TonWalletFactory)(w).create()),
|
|
68
69
|
balance: balance,
|
|
69
70
|
locale: locale,
|
|
71
|
+
ignoreConfig: ignoreConfig,
|
|
70
72
|
children: children
|
|
71
73
|
})
|
|
72
74
|
});
|
|
@@ -3,6 +3,12 @@ import type { TonWallet } from '../wallets/type';
|
|
|
3
3
|
import type { TonWeb3ConfigProviderProps } from './TonWeb3ConfigProvider';
|
|
4
4
|
interface TonConfigProviderProps extends Omit<TonWeb3ConfigProviderProps, 'wallets' | 'connectConfig'> {
|
|
5
5
|
wallets?: TonWallet[];
|
|
6
|
+
/**
|
|
7
|
+
* If true, this provider's configuration will be ignored when merging with parent context.
|
|
8
|
+
* This is useful when you have multiple chain providers and want to switch between them
|
|
9
|
+
* without causing page flickering. Only the active provider should not have this flag set.
|
|
10
|
+
*/
|
|
11
|
+
ignoreConfig?: boolean;
|
|
6
12
|
}
|
|
7
13
|
declare const TonConfigProvider: React.FC<PropsWithChildren<TonConfigProviderProps>>;
|
|
8
14
|
export default TonConfigProvider;
|
|
@@ -16,7 +16,8 @@ const TonConfigProvider = ({
|
|
|
16
16
|
children,
|
|
17
17
|
locale,
|
|
18
18
|
balance: showBalance,
|
|
19
|
-
wallets
|
|
19
|
+
wallets,
|
|
20
|
+
ignoreConfig
|
|
20
21
|
}) => {
|
|
21
22
|
const {
|
|
22
23
|
connector,
|
|
@@ -63,6 +64,7 @@ const TonConfigProvider = ({
|
|
|
63
64
|
setTonSelectWallet?.(null);
|
|
64
65
|
}
|
|
65
66
|
},
|
|
67
|
+
ignoreConfig: ignoreConfig,
|
|
66
68
|
children: children
|
|
67
69
|
});
|
|
68
70
|
};
|