@web3jskit/walletkit 0.1.3 → 0.1.5
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/README.md +132 -152
- package/dist/package.json +2 -2
- package/dist/src/components/ConnectButton/index.d.ts +0 -2
- package/dist/src/components/ConnectButton/index.js +2 -7
- package/dist/src/components/ConnectButton/index.js.map +1 -1
- package/dist/src/components/Header/style.js +4 -3
- package/dist/src/components/Header/style.js.map +1 -1
- package/dist/src/components/Introduce/index.js +2 -1
- package/dist/src/components/Introduce/index.js.map +1 -1
- package/dist/src/components/Introduce/style.js +35 -10
- package/dist/src/components/Introduce/style.js.map +1 -1
- package/dist/src/components/Modal/ConnectModal.js +14 -7
- package/dist/src/components/Modal/ConnectModal.js.map +1 -1
- package/dist/src/components/Modal/style.js +2 -1
- package/dist/src/components/Modal/style.js.map +1 -1
- package/dist/src/components/SVGs/vectorSvg.d.ts +2 -0
- package/dist/src/components/SVGs/vectorSvg.js +4 -0
- package/dist/src/components/SVGs/vectorSvg.js.map +1 -0
- package/dist/src/components/Text/index.js +1 -1
- package/dist/src/components/WalletKitProvider/ChainProvider.d.ts +7 -4
- package/dist/src/components/WalletKitProvider/ChainProvider.js +49 -12
- package/dist/src/components/WalletKitProvider/ChainProvider.js.map +1 -1
- package/dist/src/components/WalletKitProvider/index.d.ts +7 -2
- package/dist/src/components/WalletKitProvider/index.js +3 -2
- package/dist/src/components/WalletKitProvider/index.js.map +1 -1
- package/dist/src/components/WalletList/index.d.ts +1 -1
- package/dist/src/components/WalletList/index.js +2 -3
- package/dist/src/components/WalletList/index.js.map +1 -1
- package/dist/src/components/WalletTriggerButton/index.d.ts +1 -0
- package/dist/src/components/WalletTriggerButton/index.js +9 -5
- package/dist/src/components/WalletTriggerButton/index.js.map +1 -1
- package/dist/src/components/WalletTriggerButton/style.js +13 -2
- package/dist/src/components/WalletTriggerButton/style.js.map +1 -1
- package/dist/src/hooks/useWalletKit.d.ts +20 -9
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/theme/index.js +41 -0
- package/dist/src/theme/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,233 +1,213 @@
|
|
|
1
|
-
#
|
|
1
|
+
# WalletKit
|
|
2
|
+
|
|
3
|
+
**WalletKit** 是一个轻量级的多链钱包连接工具包,旨在帮助开发者快速集成支持多条链的钱包插件,如 MetaMask、Phantom、TronLink、Gel Wallet 等。它提供了便捷的状态管理、自定义 Hooks 和统一的 API,使 DApp 开发更简单高效。
|
|
2
4
|
|
|
3
5
|
**WalletKit** is a lightweight, multi-chain compatible wallet connection toolkit designed to help developers quickly integrate wallet plugins that support multiple chains, such as MetaMask, Phantom, TronLink, Gel Wallet, and more. It provides convenient state management, custom hooks, and a unified API, making DApp development simpler and more efficient.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
## 架构 Architecture
|
|
8
|
+
|
|
9
|
+
WalletKit 由两个主要部分组成 / WalletKit consists of two main parts:
|
|
10
|
+
|
|
11
|
+
1. **@web3jskit/wallethelper**: 底层钱包连接库,提供统一的钱包接口和状态管理 / Core wallet connection library providing unified wallet interfaces and state management
|
|
12
|
+
|
|
13
|
+
- 多链支持 / Multi-chain support (EVM, PUT, SOL, Tron, BTC)
|
|
14
|
+
- 钱包检测和连接 / Wallet detection and connection
|
|
15
|
+
- 统一的交易接口 / Unified transaction interface
|
|
16
|
+
- 状态管理 / State management
|
|
6
17
|
|
|
7
|
-
|
|
18
|
+
2. **@web3jskit/walletkit**: React 组件库,提供开箱即用的 UI 组件 / React component library providing ready-to-use UI components
|
|
19
|
+
- 钱包连接按钮 / Wallet connection button
|
|
20
|
+
- 钱包选择模态框 / Wallet selection modal
|
|
21
|
+
- 链切换组件 / Chain switching component
|
|
22
|
+
- 自定义 Hooks / Custom hooks
|
|
8
23
|
|
|
9
|
-
|
|
24
|
+
## 安装 Installation
|
|
25
|
+
|
|
26
|
+
通过 npm、yarn 或 pnpm 安装 / Install via npm, yarn, or pnpm:
|
|
10
27
|
|
|
11
28
|
```bash
|
|
29
|
+
# npm
|
|
12
30
|
npm install @web3jskit/walletkit
|
|
13
31
|
|
|
32
|
+
# yarn
|
|
14
33
|
yarn add @web3jskit/walletkit
|
|
15
34
|
|
|
35
|
+
# pnpm
|
|
16
36
|
pnpm add @web3jskit/walletkit
|
|
17
37
|
```
|
|
18
38
|
|
|
19
|
-
##
|
|
39
|
+
## 快速开始 Quick Start
|
|
20
40
|
|
|
21
|
-
### Import
|
|
41
|
+
### 1. 导入并初始化 Import and Initialize
|
|
22
42
|
|
|
23
43
|
```javascript
|
|
24
|
-
import {
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Core Features
|
|
44
|
+
import { WalletKitProvider, ConnectButton } from '@web3jskit/walletkit';
|
|
28
45
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// [
|
|
38
|
-
// { name: 'MetaMask', icon: '🔗', provider: ... },
|
|
39
|
-
// { name: 'Coinbase Wallet', icon: '💼', provider: ... },
|
|
40
|
-
// ...
|
|
41
|
-
// ]
|
|
46
|
+
function App() {
|
|
47
|
+
return (
|
|
48
|
+
<WalletKitProvider>
|
|
49
|
+
<ConnectButton />
|
|
50
|
+
{/* 其他组件 Other components */}
|
|
51
|
+
</WalletKitProvider>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
42
54
|
```
|
|
43
55
|
|
|
44
|
-
### 2.
|
|
45
|
-
|
|
46
|
-
Use the `connect` method of a connector to connect to a wallet:
|
|
56
|
+
### 2. 使用 Hooks Use Hooks
|
|
47
57
|
|
|
48
58
|
```javascript
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// Select a connector
|
|
52
|
-
const connector = connectors[0];
|
|
53
|
-
|
|
54
|
-
// Connect to the wallet
|
|
55
|
-
const address = await connector.connect();
|
|
56
|
-
console.log(address);
|
|
57
|
-
|
|
58
|
-
// Check the current connection status
|
|
59
|
-
console.log(walletKit.getConnectStatus()); // Output: "connected"
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 3. Use Custom Hook
|
|
63
|
-
|
|
64
|
-
WalletKit provides a custom hook `useWalletKit`, which, combined with React state management, makes development simpler and more convenient.
|
|
65
|
-
|
|
66
|
-
Using `useWalletKit`
|
|
67
|
-
|
|
68
|
-
In a React project, import `useWalletKit` and use it directly:
|
|
59
|
+
import { useWalletKit } from '@web3jskit/walletkit';
|
|
69
60
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
import { ChainType } from '@web3jskit/type';
|
|
73
|
-
import { ConnectButton, useWalletKit, AppModal, WalletKitProvider } from '@web3jskit/walletkit';
|
|
61
|
+
function MyComponent() {
|
|
62
|
+
const { openModal, currentChainType, setChainType, currentConnector, walletAddress, getProvider } = useWalletKit();
|
|
74
63
|
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
const chainList = [ChainType.EVM, ChainType.PUT, ChainType.SOL, ChainType.Tron, ChainType.BTC];
|
|
79
|
-
|
|
80
|
-
const handleConnect = async () => {
|
|
64
|
+
// 连接钱包 Connect wallet
|
|
65
|
+
const handleConnect = () => {
|
|
81
66
|
openModal(AppModal.ConnectModal);
|
|
82
67
|
};
|
|
83
68
|
|
|
69
|
+
// 断开连接 Disconnect
|
|
84
70
|
const handleDisconnect = () => {
|
|
85
71
|
currentConnector?.disconnect();
|
|
86
72
|
};
|
|
87
73
|
|
|
88
|
-
const handleGetProvider = async () => {
|
|
89
|
-
const provider = await getProvider();
|
|
90
|
-
console.log('provider', provider);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
74
|
return (
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
<div>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</div>
|
|
100
|
-
<div>
|
|
101
|
-
{chainList.map(chainType => (
|
|
102
|
-
<button key={chainType} onClick={() => switchChain(chainType)}>
|
|
103
|
-
切换{chainType}
|
|
104
|
-
</button>
|
|
105
|
-
))}
|
|
106
|
-
</div>
|
|
107
|
-
<div>
|
|
108
|
-
<button onClick={() => handleGetProvider()}>获取Provider</button>
|
|
109
|
-
</div>
|
|
110
|
-
<div>当 前 链:{currentChain}</div>
|
|
111
|
-
<div>钱 包 名:{currentConnector?.name}</div>
|
|
112
|
-
<div>钱包地址:{walletAddress}</div>
|
|
113
|
-
</WalletKitProvider>
|
|
75
|
+
<div>
|
|
76
|
+
<div>Chain: {currentChainType}</div>
|
|
77
|
+
<div>Wallet: {currentConnector?.name}</div>
|
|
78
|
+
<div>Address: {walletAddress}</div>
|
|
79
|
+
</div>
|
|
114
80
|
);
|
|
115
81
|
}
|
|
116
82
|
```
|
|
117
83
|
|
|
118
|
-
|
|
84
|
+
## 核心功能 Core Features
|
|
119
85
|
|
|
120
|
-
|
|
121
|
-
| ------------------ | ----------------------------------------------------------- |
|
|
122
|
-
| `currentChain` | Current chain ID |
|
|
123
|
-
| `getConnectors` | Method to get available connectors |
|
|
124
|
-
| `currentConnector` | Current connector instance |
|
|
125
|
-
| `connectStatus` | Current connection status (e.g., "connecting", "connected") |
|
|
126
|
-
| `closeModal` | Method to close the wallet connection modal |
|
|
127
|
-
| `provider` | Current provider instance |
|
|
128
|
-
| `...` | ...Other methods and properties |
|
|
86
|
+
### 1. 钱包连接 Wallet Connection
|
|
129
87
|
|
|
130
|
-
|
|
88
|
+
```javascript
|
|
89
|
+
const { currentConnector, connectStatus } = useWalletKit();
|
|
131
90
|
|
|
132
|
-
|
|
91
|
+
// 连接钱包 Connect wallet
|
|
92
|
+
await currentConnector.connect();
|
|
133
93
|
|
|
134
|
-
|
|
135
|
-
await
|
|
136
|
-
```
|
|
94
|
+
// 断开连接 Disconnect
|
|
95
|
+
await currentConnector.disconnect();
|
|
137
96
|
|
|
138
|
-
|
|
97
|
+
// 监听状态 Listen to status
|
|
98
|
+
console.log(connectStatus); // 'connected' | 'connecting' | 'disconnected'
|
|
99
|
+
```
|
|
139
100
|
|
|
140
|
-
|
|
101
|
+
### 2. 链切换 Chain Switching
|
|
141
102
|
|
|
142
103
|
```javascript
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
104
|
+
const { setChainType, currentChainType } = useWalletKit();
|
|
105
|
+
|
|
106
|
+
// 切换链 Switch chain
|
|
107
|
+
await setChainType(ChainType.EVM);
|
|
147
108
|
```
|
|
148
109
|
|
|
149
|
-
|
|
110
|
+
### 3. 交易操作 Transaction Operations
|
|
150
111
|
|
|
151
112
|
```javascript
|
|
152
|
-
|
|
153
|
-
|
|
113
|
+
const { currentConnector } = useWalletKit();
|
|
114
|
+
|
|
115
|
+
// 签名消息 Sign message
|
|
116
|
+
const signature = await currentConnector.signMessage('Hello Web3');
|
|
117
|
+
|
|
118
|
+
// 发送交易 Send transaction
|
|
119
|
+
const txHash = await currentConnector.sendTransaction({
|
|
120
|
+
to: '0x...',
|
|
121
|
+
value: '0x...',
|
|
154
122
|
});
|
|
155
123
|
|
|
156
|
-
|
|
157
|
-
|
|
124
|
+
// 合约调用 Contract call
|
|
125
|
+
const result = await currentConnector.writeContract({
|
|
126
|
+
address: '0x...',
|
|
127
|
+
abi: [...],
|
|
128
|
+
functionName: 'transfer',
|
|
129
|
+
args: [...],
|
|
158
130
|
});
|
|
159
131
|
```
|
|
160
132
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
Quickly integrate into a DApp using the `useWalletKit` custom hook and React state management:
|
|
133
|
+
## 支持的钱包 Supported Wallets
|
|
164
134
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
135
|
+
- MetaMask (EVM)
|
|
136
|
+
- Phantom (SOL, BTC)
|
|
137
|
+
- TronLink (TRON)
|
|
138
|
+
- Gel Wallet (EVM, PUT, SOL)
|
|
139
|
+
- OKX Wallet (EVM)
|
|
140
|
+
- Trust Wallet (EVM)
|
|
141
|
+
- TokenPocket (EVM)
|
|
142
|
+
- Bitget Wallet (EVM)
|
|
143
|
+
- Coinbase Wallet (EVM)
|
|
168
144
|
|
|
169
|
-
|
|
170
|
-
const { connectStatus, getConnectors, currentConnector } = useWalletKit();
|
|
171
|
-
|
|
172
|
-
useEffect(() => {
|
|
173
|
-
if (connectStatus === 'connected') {
|
|
174
|
-
console.log(`Connected to ${currentConnector?.name}`);
|
|
175
|
-
}
|
|
176
|
-
}, [connectStatus, currentConnector]);
|
|
177
|
-
|
|
178
|
-
const handleConnect = async () => {
|
|
179
|
-
const connectors = getConnectors();
|
|
180
|
-
if (connectors.length) {
|
|
181
|
-
await connectors[0].connect();
|
|
182
|
-
}
|
|
183
|
-
};
|
|
145
|
+
## API 参考 API Reference
|
|
184
146
|
|
|
185
|
-
|
|
186
|
-
<WalletKitProvider>
|
|
187
|
-
<button onClick={handleConnect}>{connectStatus === 'connected' ? 'Connected' : 'Connect Wallet'}</button>
|
|
188
|
-
</WalletKitProvider>;
|
|
189
|
-
};
|
|
147
|
+
### useWalletKit Hook
|
|
190
148
|
|
|
191
|
-
|
|
192
|
-
|
|
149
|
+
| 属性/方法 Property/Method | 描述 Description |
|
|
150
|
+
| ------------------------- | --------------------------------------- |
|
|
151
|
+
| `currentChainType` | 当前链类型 Current chain type |
|
|
152
|
+
| `setChainType` | 切换链类型 Switch chain type |
|
|
153
|
+
| `currentConnector` | 当前钱包连接器 Current wallet connector |
|
|
154
|
+
| `connectStatus` | 连接状态 Connection status |
|
|
155
|
+
| `walletAddress` | 钱包地址 Wallet address |
|
|
156
|
+
| `getProvider` | 获取 Provider Get provider |
|
|
157
|
+
| `openModal` | 打开模态框 Open modal |
|
|
158
|
+
| `closeModal` | 关闭模态框 Close modal |
|
|
193
159
|
|
|
194
|
-
|
|
160
|
+
### WalletConnector
|
|
195
161
|
|
|
196
|
-
|
|
162
|
+
| 方法 Method | 描述 Description |
|
|
163
|
+
| ----------------------- | ------------------------- |
|
|
164
|
+
| `connect()` | 连接钱包 Connect wallet |
|
|
165
|
+
| `disconnect()` | 断开连接 Disconnect |
|
|
166
|
+
| `signMessage(message)` | 签名消息 Sign message |
|
|
167
|
+
| `sendTransaction(tx)` | 发送交易 Send transaction |
|
|
168
|
+
| `writeContract(params)` | 合约写入 Write contract |
|
|
169
|
+
| `readContract(params)` | 合约读取 Read contract |
|
|
197
170
|
|
|
198
|
-
|
|
199
|
-
- Phantom
|
|
200
|
-
- TronLink
|
|
201
|
-
- Gel Wallet
|
|
202
|
-
- More EVM-compatible wallets
|
|
171
|
+
## 贡献指南 Contributing
|
|
203
172
|
|
|
204
|
-
|
|
173
|
+
欢迎提交 Issues 和功能请求!贡献步骤:
|
|
205
174
|
|
|
206
|
-
We welcome issues and feature requests!
|
|
175
|
+
We welcome issues and feature requests! Steps to contribute:
|
|
207
176
|
|
|
208
|
-
1. Fork this repository
|
|
209
|
-
2. Create
|
|
177
|
+
1. Fork 本仓库 Fork this repository
|
|
178
|
+
2. 创建功能分支 Create feature branch:
|
|
210
179
|
|
|
211
180
|
```bash
|
|
212
|
-
git checkout -b feature/my-
|
|
181
|
+
git checkout -b feature/my-feature
|
|
213
182
|
```
|
|
214
183
|
|
|
215
|
-
3. Commit
|
|
184
|
+
3. 提交更改 Commit changes:
|
|
216
185
|
|
|
217
186
|
```bash
|
|
218
187
|
git commit -m "Add some feature"
|
|
219
188
|
```
|
|
220
189
|
|
|
221
|
-
4. Push
|
|
190
|
+
4. 推送分支 Push branch:
|
|
222
191
|
|
|
223
192
|
```bash
|
|
224
|
-
git push origin feature/my-
|
|
193
|
+
git push origin feature/my-feature
|
|
225
194
|
```
|
|
226
195
|
|
|
227
|
-
5. Submit
|
|
196
|
+
5. 提交 Pull Request Submit Pull Request
|
|
228
197
|
|
|
229
|
-
## License
|
|
198
|
+
## 许可证 License
|
|
230
199
|
|
|
231
200
|
MIT License
|
|
232
201
|
|
|
202
|
+
## 联系我们 Contact Us
|
|
203
|
+
|
|
204
|
+
如有问题或建议,请通过以下方式联系我们:
|
|
205
|
+
|
|
206
|
+
For questions or suggestions, please contact us:
|
|
207
|
+
|
|
208
|
+
- GitHub Issues
|
|
209
|
+
- Email: <support@web3jskit.com>
|
|
210
|
+
|
|
211
|
+
希望你喜欢使用 WalletKit!
|
|
212
|
+
|
|
233
213
|
Hope you enjoy using WalletKit! 😊
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web3jskit/walletkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "walletkit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@react-spring/web": "^9.7.1",
|
|
17
17
|
"@tanstack/react-query": "^5.0.0",
|
|
18
18
|
"@web3jskit/type": "^1.1.6",
|
|
19
|
-
"@web3jskit/wallethelper": "0.1.
|
|
19
|
+
"@web3jskit/wallethelper": "0.1.5",
|
|
20
20
|
"copy-to-clipboard": "^3.3.3",
|
|
21
21
|
"i18next": "^22.4.13",
|
|
22
22
|
"i18next-browser-languagedetector": "^7.0.1",
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { SupportWallet } from '@web3jskit/wallethelper';
|
|
2
1
|
interface ConnectButtonProps {
|
|
3
2
|
text?: string;
|
|
4
3
|
showAvatar?: boolean;
|
|
5
4
|
className?: string;
|
|
6
5
|
infoClass?: string;
|
|
7
|
-
supportWallets?: SupportWallet[];
|
|
8
6
|
}
|
|
9
7
|
export declare function ConnectButton(props: ConnectButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
export {};
|
|
@@ -3,15 +3,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useWalletKit } from '../../hooks/useWalletKit';
|
|
5
5
|
import { ConnectedInfo } from './ConnectedInfo';
|
|
6
|
-
import { SupportWallet } from '@web3jskit/wallethelper';
|
|
7
|
-
import { useEffect } from 'react';
|
|
8
6
|
export function ConnectButton(props) {
|
|
9
7
|
const { t } = useTranslation();
|
|
10
|
-
const { text = t('connectWallet'), showAvatar = true, className, infoClass
|
|
11
|
-
const { avatar, connectStatus, walletAddress,
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
setSupportWallets(supportWallets);
|
|
14
|
-
}, []);
|
|
8
|
+
const { text = t('connectWallet'), showAvatar = true, className, infoClass } = props;
|
|
9
|
+
const { avatar, connectStatus, walletAddress, connect, showWalletInfo } = useWalletKit();
|
|
15
10
|
return (_jsx("div", { children: connectStatus === 'connected' ? (_jsx(ConnectedInfo, { className: infoClass, avatar: showAvatar ? avatar : undefined, walletAddress: walletAddress, onClick: () => {
|
|
16
11
|
showWalletInfo();
|
|
17
12
|
} })) : (_jsx("button", { className: className, onClick: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ConnectButton/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ConnectButton/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,UAAU,aAAa,CAAC,KAAyB;IACtD,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC,eAAe,CAAC,EAAE,UAAU,GAAG,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACrF,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IAEzF,OAAO,CACN,wBACE,aAAa,KAAK,WAAW,CAAC,CAAC,CAAC,CAChC,KAAC,aAAa,IACb,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACvC,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,GAAG,EAAE;gBACb,cAAc,EAAE,CAAC;YAClB,CAAC,GACA,CACF,CAAC,CAAC,CAAC,CACH,iBACC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE;gBACb,OAAO,EAAE,CAAC;YACX,CAAC,YAEA,IAAI,GACG,CACT,GACI,CACN,CAAC;AACH,CAAC"}
|
|
@@ -10,7 +10,7 @@ const ModalHeaderBox = styled.div `
|
|
|
10
10
|
|
|
11
11
|
.backBtn {
|
|
12
12
|
cursor: pointer;
|
|
13
|
-
margin-left:
|
|
13
|
+
margin-left: 20px;
|
|
14
14
|
|
|
15
15
|
path {
|
|
16
16
|
fill: ${({ theme }) => theme.backArrowColor};
|
|
@@ -26,7 +26,7 @@ const ModalHeaderBox = styled.div `
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.closeBtn {
|
|
29
|
-
margin-right:
|
|
29
|
+
margin-right: 20px;
|
|
30
30
|
cursor: pointer;
|
|
31
31
|
display: flex;
|
|
32
32
|
align-items: center;
|
|
@@ -49,6 +49,7 @@ const ModalHeaderBox = styled.div `
|
|
|
49
49
|
|
|
50
50
|
&.asideTitle {
|
|
51
51
|
justify-content: flex-start;
|
|
52
|
+
height: auto;
|
|
52
53
|
|
|
53
54
|
.closeBtn {
|
|
54
55
|
display: none;
|
|
@@ -62,7 +63,7 @@ const ModalHeaderBox = styled.div `
|
|
|
62
63
|
|
|
63
64
|
&.asideTitle {
|
|
64
65
|
justify-content: space-between;
|
|
65
|
-
|
|
66
|
+
height: 56px;
|
|
66
67
|
.closeBtn {
|
|
67
68
|
display: flex;
|
|
68
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/components/Header/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;WActB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc;;;;;WAKnC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS;;;;;;;;;;;;;;;;;WAiB9B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa;;sBAEvB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;;;;uBAI9B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/components/Header/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;WActB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc;;;;;WAKnC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS;;;;;;;;;;;;;;;;;WAiB9B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa;;sBAEvB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;;;;uBAI9B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B1D,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -3,8 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import ModalHeader from '../Header/ModalHeader';
|
|
5
5
|
import IntroduceContainer from './style';
|
|
6
|
+
import VectorSvg from '../SVGs/vectorSvg';
|
|
6
7
|
export function Introduce({ onGetWallet, onClose }) {
|
|
7
8
|
const { t } = useTranslation();
|
|
8
|
-
return (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { onClose: onClose, className: "mainTitle" }), _jsxs(IntroduceContainer, { children: [_jsx("div", { className: "title", children: t('introduceQuestion') }), _jsx("div", { className: "
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { onClose: onClose, className: "mainTitle" }), _jsxs(IntroduceContainer, { children: [_jsx("div", { className: "title", children: t('introduceQuestion') }), _jsxs("div", { className: "vector", children: [_jsx(VectorSvg, {}), _jsxs("div", { className: "vector-text", children: [_jsx("div", { className: "answer", children: t('introduceAnswer') }), _jsx("div", { className: "detail", children: t('introduceDetail') })] })] }), _jsx("div", { className: "footer", children: _jsx("div", { className: "button", onClick: () => onGetWallet?.(), children: t('getWallet') }) })] })] }));
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Introduce/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,kBAAkB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Introduce/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,kBAAkB,MAAM,SAAS,CAAC;AACzC,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAO1C,MAAM,UAAU,SAAS,CAAC,EAAE,WAAW,EAAE,OAAO,EAAkB;IACjE,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,OAAO,CACN,8BACC,KAAC,WAAW,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,WAAW,GAAG,EACvD,MAAC,kBAAkB,eAClB,cAAK,SAAS,EAAC,OAAO,YAAE,CAAC,CAAC,mBAAmB,CAAC,GAAO,EACrD,eAAK,SAAS,EAAC,QAAQ,aACtB,KAAC,SAAS,KAAG,EACb,eAAK,SAAS,EAAC,aAAa,aAC3B,cAAK,SAAS,EAAC,QAAQ,YAAE,CAAC,CAAC,iBAAiB,CAAC,GAAO,EACpD,cAAK,SAAS,EAAC,QAAQ,YAAE,CAAC,CAAC,iBAAiB,CAAC,GAAO,IAC/C,IACD,EACN,cAAK,SAAS,EAAC,QAAQ,YACtB,cAAK,SAAS,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,YACpD,CAAC,CAAC,WAAW,CAAC,GACV,GAID,IACc,IACnB,CACH,CAAC;AACH,CAAC"}
|
|
@@ -13,17 +13,37 @@ const IntroduceContainer = styled.div `
|
|
|
13
13
|
line-height: 18px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.vector {
|
|
17
17
|
margin-top: 24px;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 12px;
|
|
21
|
+
|
|
22
|
+
svg {
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vector-text {
|
|
27
|
+
color: #757575;
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
line-height: 14px;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
|
|
33
|
+
.answer {
|
|
34
|
+
font-weight: 700;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.detail {
|
|
38
|
+
margin-top: 14px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
21
41
|
}
|
|
22
42
|
|
|
23
|
-
.
|
|
24
|
-
margin-top:
|
|
43
|
+
.introduce {
|
|
44
|
+
margin-top: 24px;
|
|
25
45
|
font-size: 12px;
|
|
26
|
-
font-weight:
|
|
46
|
+
font-weight: 700;
|
|
27
47
|
line-height: 14px;
|
|
28
48
|
}
|
|
29
49
|
|
|
@@ -37,7 +57,7 @@ const IntroduceContainer = styled.div `
|
|
|
37
57
|
.button {
|
|
38
58
|
width: 100%;
|
|
39
59
|
display: inline-block;
|
|
40
|
-
margin-top:
|
|
60
|
+
margin-top: 12px;
|
|
41
61
|
padding: 11px 16px;
|
|
42
62
|
color: ${({ theme }) => theme.buttonColor};
|
|
43
63
|
background: ${({ theme }) => theme.buttonBg};
|
|
@@ -63,8 +83,13 @@ const IntroduceContainer = styled.div `
|
|
|
63
83
|
margin: 0;
|
|
64
84
|
align-items: center;
|
|
65
85
|
|
|
66
|
-
.
|
|
67
|
-
|
|
86
|
+
.vector {
|
|
87
|
+
svg {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
.vector-text {
|
|
91
|
+
text-align: center;
|
|
92
|
+
}
|
|
68
93
|
}
|
|
69
94
|
}
|
|
70
95
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/components/Introduce/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;UAK3B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;;;WAG9B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/components/Introduce/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;UAK3B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;;;WAG9B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAoDzB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW;gBAC3B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC5C,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import ModalHeader from '../Header/ModalHeader';
|
|
4
4
|
import Modal from './index';
|
|
5
5
|
import { SlotWrapper } from '../../styled';
|
|
6
|
-
import { SupportWallets } from '@web3jskit/wallethelper';
|
|
6
|
+
import { createConnector, SupportWallets } from '@web3jskit/wallethelper';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
9
9
|
import { WalletTriggerButton } from '../WalletTriggerButton';
|
|
@@ -24,7 +24,7 @@ var Step;
|
|
|
24
24
|
})(Step || (Step = {}));
|
|
25
25
|
export function ConnectModal({ slots }) {
|
|
26
26
|
const { t } = useTranslation();
|
|
27
|
-
const {
|
|
27
|
+
const { currentChainType, supportWallets, connectStatus, isConnecting } = useWalletKit();
|
|
28
28
|
const { connectModalData } = useModalStore();
|
|
29
29
|
const [step, setStep] = useState(Step.Introduce);
|
|
30
30
|
const [selectedWallet, setSelectedWallet] = useState(null);
|
|
@@ -33,7 +33,7 @@ export function ConnectModal({ slots }) {
|
|
|
33
33
|
return !!connectModalData;
|
|
34
34
|
}, [connectModalData]);
|
|
35
35
|
const requestConnectors = async () => {
|
|
36
|
-
const list = await
|
|
36
|
+
const list = await createConnector(currentChainType, supportWallets || []);
|
|
37
37
|
setConnectors(list);
|
|
38
38
|
};
|
|
39
39
|
const connectorsGroupByType = useMemo(() => {
|
|
@@ -62,7 +62,7 @@ export function ConnectModal({ slots }) {
|
|
|
62
62
|
setStep(0);
|
|
63
63
|
setConnectors([]);
|
|
64
64
|
}
|
|
65
|
-
}, [isOpen,
|
|
65
|
+
}, [isOpen, currentChainType]);
|
|
66
66
|
useEffect(() => {
|
|
67
67
|
switch (connectStatus) {
|
|
68
68
|
case 'connected':
|
|
@@ -96,7 +96,7 @@ export function ConnectModal({ slots }) {
|
|
|
96
96
|
default:
|
|
97
97
|
return _jsx(_Fragment, {});
|
|
98
98
|
}
|
|
99
|
-
}, [step]);
|
|
99
|
+
}, [step, selectedWallet]);
|
|
100
100
|
const handleConnect = (address) => {
|
|
101
101
|
connectModalData?.onConnect(address);
|
|
102
102
|
};
|
|
@@ -105,10 +105,17 @@ export function ConnectModal({ slots }) {
|
|
|
105
105
|
};
|
|
106
106
|
return (_jsx(Modal, { isOpen: isOpen, onCancel: handleCancel, children: _jsxs(ModalContainer, { children: [_jsxs(ModalAside, { className: step !== 0 ? 'hidden' : '', children: [_jsx(ModalHeader, { onClose: handleCancel, title: t('connectWallet'), className: "asideTitle" }), _jsxs(AsideList, { children: [sortedKeys.map(connectorType => {
|
|
107
107
|
return (_jsxs("div", { className: "typeBox", children: [_jsx("div", { className: `typeHeader ${connectorType}`, children: t(connectorType) }), connectorsGroupByType[connectorType].map((connector) => {
|
|
108
|
-
return (_jsx(WalletTriggerButton, { onConnect: handleConnect, connector: connector
|
|
108
|
+
return (_jsx(WalletTriggerButton, { onConnect: handleConnect, connector: connector, onGetWallet: () => {
|
|
109
|
+
if (connector.name === 'Gel Wallet') {
|
|
110
|
+
window.open(connector.webUrl, '_blank');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
setSelectedWallet(connector);
|
|
114
|
+
setStep(Step.GetWallet);
|
|
115
|
+
} }, connectorType + connector.name));
|
|
109
116
|
})] }, connectorType));
|
|
110
117
|
}), slots ? (slots.map((Slot, index) => {
|
|
111
118
|
return _jsx(SlotWrapper, { children: Slot }, index);
|
|
112
|
-
})) : (_jsx(_Fragment, {}))] })] }), _jsx(ModalMain, { children:
|
|
119
|
+
})) : (_jsx(_Fragment, {}))] })] }), _jsx(ModalMain, { children: isConnecting ? _jsx(Connecting, { onClose: handleCancel, wallet: isConnecting }) : renderMainByStep() })] }) }));
|
|
113
120
|
}
|
|
114
121
|
//# sourceMappingURL=ConnectModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectModal.js","sourceRoot":"","sources":["../../../../src/components/Modal/ConnectModal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConnectModal.js","sourceRoot":"","sources":["../../../../src/components/Modal/ConnectModal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,WAAW,MAAM,uBAAu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