@ant-design/web3-eth-web3js 1.0.0 → 1.1.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,5 +1,20 @@
|
|
|
1
1
|
# @ant-design/web3-eth-web3js
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 518fd83: chore: add storage props to config
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [518fd83]
|
|
12
|
+
- Updated dependencies [dd6366c]
|
|
13
|
+
- Updated dependencies [518fd83]
|
|
14
|
+
- @ant-design/web3-wagmi@2.4.5
|
|
15
|
+
- @ant-design/web3-common@1.10.0
|
|
16
|
+
- @ant-design/web3-assets@1.7.2
|
|
17
|
+
|
|
3
18
|
## 1.0.0
|
|
4
19
|
|
|
5
20
|
### Major Changes
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WagmiWeb3ConfigProviderProps } from '@ant-design/web3-wagmi';
|
|
3
|
+
import { type Storage } from 'wagmi';
|
|
3
4
|
import type { WalletConnectParameters } from 'wagmi/connectors';
|
|
4
5
|
export interface WalletConnectOptions extends Pick<WalletConnectParameters, 'disableProviderPing' | 'isNewChainsStale' | 'projectId' | 'metadata' | 'relayUrl' | 'storageOptions' | 'qrModalOptions'> {
|
|
5
6
|
useWalletConnectOfficialModal?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface EthWeb3jsConfigProviderProps extends Omit<WagmiWeb3ConfigProviderProps, 'config'> {
|
|
8
9
|
walletConnect?: false | WalletConnectOptions;
|
|
10
|
+
storage?: Storage | false;
|
|
9
11
|
}
|
|
10
12
|
export declare const EthWeb3jsConfigProvider: React.FC<React.PropsWithChildren<EthWeb3jsConfigProviderProps>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["children", "walletConnect"];
|
|
2
|
+
var _excluded = ["children", "walletConnect", "storage"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -23,6 +23,7 @@ export var EthWeb3jsConfigProvider = function EthWeb3jsConfigProvider(_ref) {
|
|
|
23
23
|
var _props$chains2;
|
|
24
24
|
var children = _ref.children,
|
|
25
25
|
walletConnect = _ref.walletConnect,
|
|
26
|
+
storage = _ref.storage,
|
|
26
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
28
|
var chains = React.useMemo(function () {
|
|
28
29
|
var _props$chains;
|
|
@@ -70,9 +71,10 @@ export var EthWeb3jsConfigProvider = function EthWeb3jsConfigProvider(_ref) {
|
|
|
70
71
|
return createConfig({
|
|
71
72
|
chains: chains,
|
|
72
73
|
transports: transports,
|
|
73
|
-
connectors: connectors
|
|
74
|
+
connectors: connectors,
|
|
75
|
+
storage: storage === false ? null : storage
|
|
74
76
|
});
|
|
75
|
-
}, [chains, walletConnect, props.wallets]);
|
|
77
|
+
}, [chains, walletConnect, props.wallets, storage]);
|
|
76
78
|
return /*#__PURE__*/_jsx(WagmiWeb3ConfigProvider, _objectSpread(_objectSpread({}, props), {}, {
|
|
77
79
|
config: wagmiConfig,
|
|
78
80
|
wallets: wallets,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WagmiWeb3ConfigProviderProps } from '@ant-design/web3-wagmi';
|
|
3
|
+
import { type Storage } from 'wagmi';
|
|
3
4
|
import type { WalletConnectParameters } from 'wagmi/connectors';
|
|
4
5
|
export interface WalletConnectOptions extends Pick<WalletConnectParameters, 'disableProviderPing' | 'isNewChainsStale' | 'projectId' | 'metadata' | 'relayUrl' | 'storageOptions' | 'qrModalOptions'> {
|
|
5
6
|
useWalletConnectOfficialModal?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface EthWeb3jsConfigProviderProps extends Omit<WagmiWeb3ConfigProviderProps, 'config'> {
|
|
8
9
|
walletConnect?: false | WalletConnectOptions;
|
|
10
|
+
storage?: Storage | false;
|
|
9
11
|
}
|
|
10
12
|
export declare const EthWeb3jsConfigProvider: React.FC<React.PropsWithChildren<EthWeb3jsConfigProviderProps>>;
|
|
@@ -16,6 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
const EthWeb3jsConfigProvider = ({
|
|
17
17
|
children,
|
|
18
18
|
walletConnect,
|
|
19
|
+
storage,
|
|
19
20
|
...props
|
|
20
21
|
}) => {
|
|
21
22
|
const chains = _react.default.useMemo(() => (props.chains ?? [_web3Wagmi.Mainnet]).map(chain => {
|
|
@@ -50,9 +51,10 @@ const EthWeb3jsConfigProvider = ({
|
|
|
50
51
|
return (0, _wagmi.createConfig)({
|
|
51
52
|
chains,
|
|
52
53
|
transports,
|
|
53
|
-
connectors
|
|
54
|
+
connectors,
|
|
55
|
+
storage: storage === false ? null : storage
|
|
54
56
|
});
|
|
55
|
-
}, [chains, walletConnect, props.wallets]);
|
|
57
|
+
}, [chains, walletConnect, props.wallets, storage]);
|
|
56
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_web3Wagmi.WagmiWeb3ConfigProvider, {
|
|
57
59
|
...props,
|
|
58
60
|
config: wagmiConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/web3-eth-web3js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"url": "https://github.com/ant-design/ant-design-web3"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@tanstack/react-query": "^5.
|
|
46
|
+
"@tanstack/react-query": "^5.37.1",
|
|
47
47
|
"debug": "^4.3.4",
|
|
48
48
|
"viem": ">=2.0.0",
|
|
49
49
|
"wagmi": "^2.5.7",
|
|
50
|
-
"@ant-design/web3-
|
|
51
|
-
"@ant-design/web3-assets": "1.7.
|
|
52
|
-
"@ant-design/web3-
|
|
50
|
+
"@ant-design/web3-common": "1.10.0",
|
|
51
|
+
"@ant-design/web3-assets": "1.7.2",
|
|
52
|
+
"@ant-design/web3-wagmi": "2.4.5"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/debug": "^4.1.12",
|