@onekeyfe/inpage-providers-hub 2.2.1 → 2.2.2
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/dist/cjs/floatingButton/index.js +107 -99
- package/dist/floatingButton/index.js +108 -100
- package/package.json +22 -22
|
@@ -18,12 +18,12 @@ const images_1 = require("./images");
|
|
|
18
18
|
let isInjected = false;
|
|
19
19
|
let i18n = {};
|
|
20
20
|
const logoStyle = {
|
|
21
|
-
width: '
|
|
22
|
-
height: '
|
|
21
|
+
width: '24px',
|
|
22
|
+
height: '24px',
|
|
23
23
|
};
|
|
24
24
|
const textStyle = {
|
|
25
25
|
color: 'rgba(0, 0, 0, 0.61)',
|
|
26
|
-
fontSize: '
|
|
26
|
+
fontSize: '14px',
|
|
27
27
|
marginLeft: '8px',
|
|
28
28
|
};
|
|
29
29
|
const containerId = 'onekey-floating-widget';
|
|
@@ -35,8 +35,7 @@ const removeIcon = () => {
|
|
|
35
35
|
const useOutsideClick = (ref, callback) => {
|
|
36
36
|
(0, hooks_1.useEffect)(() => {
|
|
37
37
|
const handleClickOutside = (event) => {
|
|
38
|
-
if (ref.current &&
|
|
39
|
-
!ref.current.contains(event.target)) {
|
|
38
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
40
39
|
callback();
|
|
41
40
|
}
|
|
42
41
|
};
|
|
@@ -63,30 +62,36 @@ function CloseDialog({ onClose }) {
|
|
|
63
62
|
removeIcon();
|
|
64
63
|
}, []);
|
|
65
64
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
display: 'flex',
|
|
66
|
+
flexDirection: 'column',
|
|
67
|
+
gap: '8px',
|
|
68
|
+
padding: '12px',
|
|
68
69
|
position: 'absolute',
|
|
69
|
-
right: '
|
|
70
|
-
|
|
71
|
-
top: '
|
|
72
|
-
width: '
|
|
73
|
-
borderRadius: '
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
right: '100%',
|
|
71
|
+
background: '#fff',
|
|
72
|
+
top: '40px',
|
|
73
|
+
width: '196px',
|
|
74
|
+
borderRadius: '12px',
|
|
75
|
+
boxShadow: '0px 0px 0px 1px rgba(0, 0, 0, 0.05),0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
|
|
76
|
+
color: 'rgba(0, 0, 0, 1)',
|
|
77
|
+
fontSize: '12px',
|
|
78
|
+
lineHeight: '16px',
|
|
79
|
+
}, ref: dialogRef, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
80
|
+
display: 'flex',
|
|
81
|
+
alignItems: 'center',
|
|
78
82
|
cursor: 'pointer',
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
fontSize: '12px',
|
|
84
|
-
fontWeight: '400',
|
|
83
|
+
gap: '8px',
|
|
84
|
+
}, onClick: handleHideOnSite, children: [(0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M2.29312 2.2929C2.68364 1.90237 3.31681 1.90237 3.70734 2.29289L7.35069 5.9362L21.7073 20.2929C22.0979 20.6834 22.0979 21.3166 21.7073 21.7071C21.3168 22.0976 20.6836 22.0976 20.2931 21.7071L17.2031 18.617C14.684 20.0216 11.8704 20.363 9.19337 19.6107C6.27083 18.7893 3.59188 16.6894 1.6441 13.4178C1.12514 12.5461 1.12292 11.4579 1.64298 10.5841C2.63083 8.92441 3.8063 7.56606 5.10844 6.52239L2.29313 3.70711C1.9026 3.31659 1.9026 2.68342 2.29312 2.2929ZM6.53283 7.94678L7.41812 8.8321L8.5542 9.96818C8.20253 10.5636 8.00023 11.2586 8.00023 12C8.00023 14.2091 9.79109 16 12.0002 16C12.7416 16 13.4366 15.7977 14.0321 15.446L15.7203 17.1343C13.7862 18.0642 11.7083 18.24 9.73447 17.6852C7.37839 17.0231 5.08952 15.2953 3.36259 12.3947C3.21773 12.1514 3.21796 11.8483 3.36159 11.607C4.28389 10.0575 5.36713 8.84257 6.53283 7.94678ZM12.5184 13.9324L10.0678 11.4818C10.0237 11.647 10.0002 11.8207 10.0002 12C10.0002 13.1046 10.8957 14 12.0002 14C12.1796 14 12.3532 13.9765 12.5184 13.9324ZM20.6388 11.6068C18.1001 7.34166 14.3527 5.6013 10.8782 6.07652C10.331 6.15137 9.82679 5.76845 9.75195 5.22126C9.67711 4.67407 10.06 4.16981 10.6072 4.09497C15.0162 3.49193 19.4849 5.75792 22.3574 10.5838C22.8767 11.4564 22.8771 12.5429 22.3576 13.4157C21.9613 14.0815 21.535 14.6987 21.0823 15.2666C20.738 15.6985 20.1088 15.7695 19.677 15.4253C19.2451 15.081 19.1741 14.4519 19.5183 14.02C19.9123 13.5257 20.2873 12.9836 20.6389 12.3928C20.7831 12.1507 20.7831 11.8493 20.6388 11.6068Z", fill: "rgba(0, 0, 0, 0.61)" }) }), (0, jsx_runtime_1.jsx)("div", { children: i18n.hideOnThisSite })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
85
|
+
display: 'flex',
|
|
86
|
+
alignItems: 'center',
|
|
85
87
|
cursor: 'pointer',
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
gap: '8px',
|
|
89
|
+
}, onClick: handleDisable, children: [(0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12 4C7.58172 4 4 7.58172 4 12C4 13.8491 4.62644 15.5506 5.68009 16.9057L16.9057 5.68009C15.5506 4.62644 13.8491 4 12 4ZM18.3199 7.0943L7.0943 18.3199C8.44939 19.3736 10.1509 20 12 20C16.4183 20 20 16.4183 20 12C20 10.1509 19.3736 8.44939 18.3199 7.0943ZM2 12C2 6.47715 6.47715 2 12 2C14.7611 2 17.2625 3.12038 19.0711 4.92893C20.8796 6.73748 22 9.23885 22 12C22 17.5228 17.5228 22 12 22C9.23885 22 6.73748 20.8796 4.92893 19.0711C3.12038 17.2625 2 14.7611 2 12Z", fill: "rgba(0, 0, 0, 0.61)" }) }), (0, jsx_runtime_1.jsx)("div", { children: i18n.disable })] }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
90
|
+
color: 'rgba(0, 0, 0, 0.61)',
|
|
91
|
+
fontSize: '12px',
|
|
92
|
+
lineHeight: '16px',
|
|
93
|
+
paddingTop: '8px',
|
|
94
|
+
borderTop: '1px solid rgba(0, 0, 0, 0.05)',
|
|
90
95
|
}, children: i18n.canBeReEnabledInSettings })] }));
|
|
91
96
|
}
|
|
92
97
|
function IconButton({ isExpanded, onClick, dataLoaded, isShowCloseDialog, showCloseDialog, }) {
|
|
@@ -94,10 +99,8 @@ function IconButton({ isExpanded, onClick, dataLoaded, isShowCloseDialog, showCl
|
|
|
94
99
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
95
100
|
display: 'flex',
|
|
96
101
|
alignItems: 'center',
|
|
97
|
-
width: '184px',
|
|
98
102
|
position: 'relative',
|
|
99
103
|
cursor: 'pointer',
|
|
100
|
-
padding: '8px',
|
|
101
104
|
}, onMouseEnter: () => {
|
|
102
105
|
if (isExpanded || isShowCloseDialog) {
|
|
103
106
|
return;
|
|
@@ -109,32 +112,36 @@ function IconButton({ isExpanded, onClick, dataLoaded, isShowCloseDialog, showCl
|
|
|
109
112
|
}
|
|
110
113
|
setIsShowCloseButton(false);
|
|
111
114
|
onClick();
|
|
112
|
-
}, children: [(0, jsx_runtime_1.jsx)(images_1.Logo, { style: logoStyle }), !dataLoaded && (
|
|
115
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', padding: '8px' }, children: [(0, jsx_runtime_1.jsx)(images_1.Logo, { style: logoStyle }), !dataLoaded && (0, jsx_runtime_1.jsx)("span", { style: textStyle, children: isExpanded ? i18n.fetchingDAppInfo : '' })] }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
116
|
+
display: 'flex',
|
|
117
|
+
padding: '$4',
|
|
113
118
|
position: 'absolute',
|
|
114
|
-
left: '
|
|
119
|
+
left: '-6px',
|
|
115
120
|
bottom: '-10px',
|
|
121
|
+
transition: 'all 150ms cubic-bezier(0.4, 0, 0.2, 1)',
|
|
116
122
|
opacity: showCloseButton ? 1 : 0,
|
|
123
|
+
borderRadius: '9999px',
|
|
124
|
+
backgroundColor: '#fff',
|
|
125
|
+
border: '1px solid rgba(0, 0, 0, 0.1)',
|
|
117
126
|
}, onClick: (event) => {
|
|
118
127
|
event.stopPropagation();
|
|
119
128
|
setIsShowCloseButton(false);
|
|
120
129
|
showCloseDialog();
|
|
121
|
-
}, children: (0, jsx_runtime_1.jsx)("svg", { width: "
|
|
130
|
+
}, children: (0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.29289 7.29289C7.68342 6.90237 8.31658 6.90237 8.70711 7.29289L12 10.5858L15.2929 7.29289C15.6834 6.90237 16.3166 6.90237 16.7071 7.29289C17.0976 7.68342 17.0976 8.31658 16.7071 8.70711L13.4142 12L16.7071 15.2929C17.0976 15.6834 17.0976 16.3166 16.7071 16.7071C16.3166 17.0976 15.6834 17.0976 15.2929 16.7071L12 13.4142L8.70711 16.7071C8.31658 17.0976 7.68342 17.0976 7.29289 16.7071C6.90237 16.3166 6.90237 15.6834 7.29289 15.2929L10.5858 12L7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289Z", fill: "rgba(0, 0, 0, 0.61)" }) }) })] }));
|
|
122
131
|
}
|
|
123
|
-
function SecurityInfoRow({ title, children
|
|
132
|
+
function SecurityInfoRow({ title, children }) {
|
|
124
133
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
125
134
|
display: 'flex',
|
|
126
|
-
height: '16px',
|
|
127
135
|
flexDirection: 'row',
|
|
128
136
|
justifyContent: 'space-between',
|
|
129
137
|
alignItems: 'center',
|
|
130
|
-
padding: '0 8px',
|
|
131
138
|
}, children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
132
139
|
color: 'rgba(0, 0, 0, 0.61)',
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
fontSize: '12px',
|
|
141
|
+
lineHeight: '16px',
|
|
135
142
|
}, children: title }), children] }));
|
|
136
143
|
}
|
|
137
|
-
function SecurityRiskDetectionRow({ securityInfo
|
|
144
|
+
function SecurityRiskDetectionRow({ securityInfo }) {
|
|
138
145
|
const { securityElement, securityStatus } = (0, hooks_1.useMemo)(() => {
|
|
139
146
|
const security = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => item.riskLevel === type_1.EHostSecurityLevel.Security).map((item) => item.name).join(' & ')) || '';
|
|
140
147
|
if (security) {
|
|
@@ -143,8 +150,9 @@ function SecurityRiskDetectionRow({ securityInfo, }) {
|
|
|
143
150
|
securityElement: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
144
151
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
145
152
|
fontWeight: '500',
|
|
146
|
-
fontSize: '
|
|
147
|
-
|
|
153
|
+
fontSize: '12px',
|
|
154
|
+
lineHeight: '16px',
|
|
155
|
+
}, children: i18n.verifiedSite }), (0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { width: "16", height: "16", viewBox: "0 0 24 24", d: "M10.4673 2.69869C11.2767 1.76711 12.7232 1.7671 13.5326 2.69868L14.8908 4.26193C14.8977 4.26983 14.9082 4.27364 14.9185 4.272L16.9638 3.94755C18.1827 3.7542 19.2907 4.68395 19.3119 5.91786L19.3476 7.98845C19.3478 7.99891 19.3533 8.00854 19.3623 8.01393L21.1377 9.08009C22.1956 9.71544 22.4468 11.1399 21.6699 12.0988L20.3663 13.7079C20.3597 13.716 20.3578 13.7269 20.3612 13.7368L21.0359 15.6947C21.4379 16.8615 20.7147 18.1142 19.5032 18.3493L17.4703 18.744C17.46 18.746 17.4515 18.7531 17.4478 18.7629L16.7061 20.6964C16.2641 21.8487 14.9049 22.3434 13.8257 21.7448L12.0147 20.7404C12.0055 20.7353 11.9944 20.7353 11.9852 20.7404L10.1742 21.7448C9.09503 22.3434 7.73582 21.8487 7.29383 20.6964L6.55216 18.7629C6.54841 18.7531 6.53989 18.746 6.52962 18.744L4.49668 18.3493C3.2852 18.1142 2.56198 16.8615 2.96404 15.6947L3.63873 13.7368C3.64214 13.7269 3.64021 13.716 3.63362 13.7079L2.32998 12.0988C1.55311 11.1399 1.80428 9.71544 2.86226 9.08009L4.63762 8.01393C4.64659 8.00854 4.65215 7.99891 4.65233 7.98845L4.68797 5.91786C4.70921 4.68395 5.81725 3.7542 7.0361 3.94755L9.08142 4.272C9.09176 4.27364 9.10221 4.26983 9.10907 4.26193L10.4673 2.69869ZM15.2071 11.2071C15.5976 10.8166 15.5976 10.1834 15.2071 9.79289C14.8166 9.40237 14.1834 9.40237 13.7929 9.79289L11 12.5858L10.2071 11.7929C9.81655 11.4024 9.18339 11.4024 8.79286 11.7929C8.40234 12.1834 8.40234 12.8166 8.79286 13.2071L9.93931 14.3536C10.5251 14.9393 11.4748 14.9393 12.0606 14.3536L15.2071 11.2071Z", fill: "#006B3B", fillOpacity: "0.906" }) })] })),
|
|
148
156
|
};
|
|
149
157
|
}
|
|
150
158
|
const highSecurity = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => item.riskLevel === type_1.EHostSecurityLevel.High).map((item) => item.name).join(' & ')) || '';
|
|
@@ -154,7 +162,8 @@ function SecurityRiskDetectionRow({ securityInfo, }) {
|
|
|
154
162
|
securityElement: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
155
163
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
156
164
|
fontWeight: '500',
|
|
157
|
-
fontSize: '
|
|
165
|
+
fontSize: '12px',
|
|
166
|
+
lineHeight: '16px',
|
|
158
167
|
}, children: i18n.maliciousSiteWarning }), (0, jsx_runtime_1.jsx)("svg", { width: "18", height: "16", viewBox: "0 0 18 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.83981 2.21151C7.8045 0.557753 10.194 0.557748 11.1587 2.21151L17.007 12.2371C17.9792 13.9038 16.777 15.9968 14.8475 15.9968H3.15098C1.22151 15.9968 0.0193263 13.9038 0.991535 12.2371L6.83981 2.21151ZM9.00008 5.99683C9.46032 5.99683 9.83342 6.36992 9.83342 6.83016V9.33016C9.83342 9.7904 9.46032 10.1635 9.00008 10.1635C8.53984 10.1635 8.16675 9.7904 8.16675 9.33016V6.83016C8.16675 6.36992 8.53984 5.99683 9.00008 5.99683ZM7.95842 11.8302C7.95842 11.2549 8.42478 10.7885 9.00008 10.7885C9.57538 10.7885 10.0417 11.2549 10.0417 11.8302C10.0417 12.4055 9.57538 12.8718 9.00008 12.8718C8.42478 12.8718 7.95842 12.4055 7.95842 11.8302Z", fill: "#BB0007", fillOpacity: "0.836" }) })] })),
|
|
159
168
|
};
|
|
160
169
|
}
|
|
@@ -165,7 +174,8 @@ function SecurityRiskDetectionRow({ securityInfo, }) {
|
|
|
165
174
|
securityElement: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
166
175
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
167
176
|
fontWeight: '500',
|
|
168
|
-
fontSize: '
|
|
177
|
+
fontSize: '12px',
|
|
178
|
+
lineHeight: '16px',
|
|
169
179
|
}, children: i18n.suspectedMaliciousBehavior }), (0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.96786 0.159913C3.52858 0.159899 3.14962 0.159886 2.83748 0.185389C2.50802 0.212306 2.18034 0.271736 1.86503 0.432398C1.39462 0.672081 1.01217 1.05453 0.772486 1.52494C0.611824 1.84025 0.552394 2.16794 0.525477 2.49739C0.499974 2.80953 0.499986 3.18849 0.500001 3.62776V11.692C0.499986 12.1313 0.499974 12.5103 0.525477 12.8224C0.552394 13.1519 0.611824 13.4796 0.772486 13.7949C1.01217 14.2653 1.39462 14.6477 1.86503 14.8874C2.18034 15.0481 2.50802 15.1075 2.83748 15.1344C3.14962 15.1599 3.52858 15.1599 3.96786 15.1599H12.0321C12.4714 15.1599 12.8504 15.1599 13.1625 15.1344C13.492 15.1075 13.8197 15.0481 14.135 14.8874C14.6054 14.6477 14.9878 14.2653 15.2275 13.7949C15.3882 13.4796 15.4476 13.1519 15.4745 12.8224C15.5 12.5103 15.5 12.1313 15.5 11.6921V3.62778C15.5 3.18849 15.5 2.80953 15.4745 2.49739C15.4476 2.16794 15.3882 1.84025 15.2275 1.52494C14.9878 1.05453 14.6054 0.672081 14.135 0.432398C13.8197 0.271736 13.492 0.212306 13.1625 0.185389C12.8504 0.159886 12.4714 0.159899 12.0322 0.159913H3.96786ZM6.33333 6.82658C6.33333 6.36634 6.70643 5.99325 7.16667 5.99325H8C8.46024 5.99325 8.83333 6.36634 8.83333 6.82658V10.9932C8.83333 11.4535 8.46024 11.8266 8 11.8266C7.53976 11.8266 7.16667 11.4535 7.16667 10.9932V7.65991C6.70643 7.65991 6.33333 7.28682 6.33333 6.82658ZM8 3.49325C7.53976 3.49325 7.16667 3.86634 7.16667 4.32658C7.16667 4.78682 7.53976 5.15991 8 5.15991C8.46024 5.15991 8.83333 4.78682 8.83333 4.32658C8.83333 3.86634 8.46024 3.49325 8 3.49325Z", fill: "#5E4200", fillOpacity: "0.844" }) })] })),
|
|
170
180
|
};
|
|
171
181
|
}
|
|
@@ -174,7 +184,8 @@ function SecurityRiskDetectionRow({ securityInfo, }) {
|
|
|
174
184
|
securityElement: ((0, jsx_runtime_1.jsx)("span", { style: {
|
|
175
185
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
176
186
|
fontWeight: '500',
|
|
177
|
-
fontSize: '
|
|
187
|
+
fontSize: '12px',
|
|
188
|
+
lineHeight: '16px',
|
|
178
189
|
}, children: i18n.unknown })),
|
|
179
190
|
};
|
|
180
191
|
}, [securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources]);
|
|
@@ -191,34 +202,30 @@ function SecurityInfo({ securityInfo, onClose, showCloseDialog, }) {
|
|
|
191
202
|
return ((0, jsx_runtime_1.jsxs)("div", { ref: viewRef, style: {
|
|
192
203
|
display: 'flex',
|
|
193
204
|
flexDirection: 'column',
|
|
194
|
-
width: '234px',
|
|
195
|
-
borderTopLeftRadius: '12px',
|
|
196
|
-
borderBottomLeftRadius: '12px',
|
|
197
|
-
paddingTop: '8px',
|
|
198
205
|
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
199
206
|
display: 'flex',
|
|
200
207
|
flexDirection: 'column',
|
|
201
|
-
gap: '8px',
|
|
202
208
|
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
203
|
-
padding: '
|
|
209
|
+
padding: '8px',
|
|
204
210
|
display: 'flex',
|
|
205
211
|
alignItems: 'center',
|
|
206
212
|
flexDirection: 'row',
|
|
207
213
|
justifyContent: 'space-between',
|
|
214
|
+
borderBottom: '1px solid rgba(0, 0, 0, 0.05)',
|
|
208
215
|
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
209
216
|
display: 'flex',
|
|
210
217
|
flexDirection: 'row',
|
|
211
218
|
alignItems: 'center',
|
|
212
219
|
gap: '8px',
|
|
213
220
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
214
|
-
fontSize: '
|
|
221
|
+
fontSize: '14px',
|
|
215
222
|
fontWeight: '500',
|
|
216
223
|
overflow: 'hidden',
|
|
217
224
|
}, children: [((_a = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _a === void 0 ? void 0 : _a.logo) ? ((0, jsx_runtime_1.jsx)("img", { src: (_b = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _b === void 0 ? void 0 : _b.logo, style: {
|
|
218
225
|
height: '24px',
|
|
219
226
|
width: '24px',
|
|
220
|
-
borderRadius: '
|
|
221
|
-
} })) : ((0, jsx_runtime_1.jsxs)("svg", {
|
|
227
|
+
borderRadius: '8px',
|
|
228
|
+
} })) : ((0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
222
229
|
width: '24px',
|
|
223
230
|
height: '24px',
|
|
224
231
|
}, children: [(0, jsx_runtime_1.jsx)("path", { d: "M6.6234 6.17768C6.6234 4.79769 7.73338 3.66333 9.1234 3.66333C10.5134 3.66333 11.6234 4.79769 11.6234 6.17768C11.6234 7.30559 10.8798 7.89399 10.4435 8.19056C10.3054 8.28442 10.2138 8.36716 10.1499 8.45311C10.092 8.53086 10.0368 8.63774 10.0107 8.81185C9.92866 9.35801 9.41941 9.73426 8.87325 9.65224C8.3271 9.57021 7.95084 9.06096 8.03287 8.5148C8.19122 7.4605 8.81104 6.8819 9.31912 6.53656C9.47624 6.42975 9.54878 6.36136 9.58594 6.31084C9.60107 6.29027 9.60813 6.27529 9.61242 6.26261C9.61657 6.25036 9.6234 6.22488 9.6234 6.17768C9.6234 5.88426 9.39093 5.66333 9.1234 5.66333C8.85586 5.66333 8.6234 5.88426 8.6234 6.17768C8.6234 6.72996 8.17568 7.17768 7.6234 7.17768C7.07111 7.17768 6.6234 6.72996 6.6234 6.17768Z", fill: "#3C3C3C" }), (0, jsx_runtime_1.jsx)("path", { d: "M7.74976 11.5C7.74976 12.1904 8.3094 12.75 8.99976 12.75C9.69011 12.75 10.2498 12.1904 10.2498 11.5C10.2498 10.8096 9.69011 10.25 8.99976 10.25C8.3094 10.25 7.74976 10.8096 7.74976 11.5Z", fill: "#3C3C3C" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.00195 2.00272e-05L15.0019 0C16.6588 -2.7418e-06 18.002 1.34314 18.002 3V13.0358C18.002 14.6926 16.6588 16.0357 15.002 16.0358L12.3757 16.0358L8.99393 18.8375L5.65157 16.0358H3.00195C1.3451 16.0358 0.00195312 14.6926 0.00195312 13.0358V3.00002C0.00195312 1.34317 1.34509 2.2769e-05 3.00195 2.00272e-05ZM15.002 2L3.00195 2.00002C2.44967 2.00002 2.00195 2.44774 2.00195 3.00002V13.0358C2.00195 13.5881 2.44967 14.0358 3.00195 14.0358H5.65157C6.12143 14.0358 6.57629 14.2012 6.93638 14.503L9.00143 16.2341L11.0997 14.4957C11.4585 14.1984 11.9098 14.0358 12.3757 14.0358L15.002 14.0358C15.5542 14.0358 16.002 13.588 16.002 13.0358V3C16.002 2.44772 15.5542 2 15.002 2Z", fill: "#3C3C3C" })] })), (0, jsx_runtime_1.jsx)("span", { style: {
|
|
@@ -226,54 +233,53 @@ function SecurityInfo({ securityInfo, onClose, showCloseDialog, }) {
|
|
|
226
233
|
overflow: 'hidden',
|
|
227
234
|
textOverflow: 'ellipsis'
|
|
228
235
|
}, children: ((_c = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _c === void 0 ? void 0 : _c.name) || (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.host) })] }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
229
|
-
width: "24",
|
|
230
|
-
height: "24",
|
|
231
|
-
cursor: "pointer",
|
|
232
236
|
display: 'flex',
|
|
233
|
-
|
|
237
|
+
width: '24',
|
|
238
|
+
height: '24',
|
|
239
|
+
cursor: 'pointer',
|
|
234
240
|
}, onClick: () => {
|
|
235
241
|
onClose();
|
|
236
242
|
setTimeout(() => {
|
|
237
243
|
showCloseDialog();
|
|
238
244
|
}, 200);
|
|
239
|
-
}, children: (0, jsx_runtime_1.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24",
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
245
|
+
}, children: (0, jsx_runtime_1.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.29289 7.29289C7.68342 6.90237 8.31658 6.90237 8.70711 7.29289L12 10.5858L15.2929 7.29289C15.6834 6.90237 16.3166 6.90237 16.7071 7.29289C17.0976 7.68342 17.0976 8.31658 16.7071 8.70711L13.4142 12L16.7071 15.2929C17.0976 15.6834 17.0976 16.3166 16.7071 16.7071C16.3166 17.0976 15.6834 17.0976 15.2929 16.7071L12 13.4142L8.70711 16.7071C8.31658 17.0976 7.68342 17.0976 7.29289 16.7071C6.90237 16.3166 6.90237 15.6834 7.29289 15.2929L10.5858 12L7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289Z", fill: "rgba(0, 0, 0, 0.61)" }) }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', padding: '12px 8px', gap: '12px' }, children: [((_d = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _d === void 0 ? void 0 : _d.origins.length) ? ((0, jsx_runtime_1.jsx)(SecurityInfoRow, { title: i18n.dappListedBy, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
246
|
+
display: 'flex',
|
|
247
|
+
alignItems: 'center',
|
|
248
|
+
gap: '2px',
|
|
249
|
+
}, children: (_e = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _e === void 0 ? void 0 : _e.origins.map((item) => ((0, jsx_runtime_1.jsx)("img", { src: item.logo, style: {
|
|
250
|
+
border: '1px solid rgba(0, 0, 0, 0.1)',
|
|
251
|
+
borderRadius: '9999px',
|
|
252
|
+
width: '16px',
|
|
253
|
+
height: '16px',
|
|
254
|
+
} }))) }) })) : null, (0, jsx_runtime_1.jsx)(SecurityRiskDetectionRow, { securityInfo: securityInfo }), ((_f = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _f === void 0 ? void 0 : _f.origins.length) ? ((0, jsx_runtime_1.jsx)(SecurityInfoRow, { title: i18n.lastVerifiedAt, children: (0, jsx_runtime_1.jsx)("span", { style: {
|
|
255
|
+
fontWeight: '500',
|
|
256
|
+
fontSize: '12px',
|
|
257
|
+
lineHeight: '16px',
|
|
258
|
+
color: 'rgba(0, 0, 0, 0.88)',
|
|
259
|
+
}, children: securityInfo.updatedAt }) })) : null] })] }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
260
|
+
display: 'flex',
|
|
261
|
+
gap: '8px',
|
|
262
|
+
padding: '12px 8px',
|
|
263
|
+
alignItems: 'center',
|
|
264
|
+
justifyContent: 'center',
|
|
265
|
+
backgroundColor: '#F9F9F9',
|
|
259
266
|
borderBottomLeftRadius: '12px',
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
justifyContent: "center",
|
|
267
|
+
borderBottomRightRadius: '12px',
|
|
268
|
+
borderTop: '1px solid rgba(0, 0, 0, 0.05)',
|
|
263
269
|
}, children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
270
|
+
flex: 1,
|
|
264
271
|
color: 'rgba(0, 0, 0, 0.61)',
|
|
265
272
|
fontWeight: '400',
|
|
266
|
-
fontSize: '
|
|
273
|
+
fontSize: '12px',
|
|
274
|
+
lineHeight: '16px',
|
|
267
275
|
}, children: "Powered by" }), (0, jsx_runtime_1.jsx)(images_1.Logo, { style: {
|
|
268
|
-
width: '
|
|
269
|
-
height: '
|
|
270
|
-
marginLeft: '5.6px',
|
|
271
|
-
marginRight: '4.2px',
|
|
272
|
-
verticalAlign: 'middle',
|
|
276
|
+
width: '14px',
|
|
277
|
+
height: '14px',
|
|
273
278
|
} }), (0, jsx_runtime_1.jsx)("span", { style: {
|
|
274
279
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
275
|
-
fontWeight: '
|
|
276
|
-
fontSize: '
|
|
280
|
+
fontWeight: '500',
|
|
281
|
+
fontSize: '12px',
|
|
282
|
+
lineHeight: '16px',
|
|
277
283
|
}, children: "OneKey" })] })] }));
|
|
278
284
|
}
|
|
279
285
|
function App() {
|
|
@@ -295,19 +301,21 @@ function App() {
|
|
|
295
301
|
setSecurityInfo(result.securityInfo);
|
|
296
302
|
}
|
|
297
303
|
}), [isExpanded, securityInfo]);
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
304
|
+
return ((0, jsx_runtime_1.jsxs)("div", { id: containerId, style: {
|
|
305
|
+
position: 'fixed',
|
|
306
|
+
zIndex: 999999,
|
|
307
|
+
top: '75%',
|
|
308
|
+
right: '0px',
|
|
309
|
+
width: '256px',
|
|
310
|
+
background: '#fff',
|
|
311
|
+
borderRadius: '12px',
|
|
312
|
+
transition: 'all 150ms cubic-bezier(0.4, 0, 0.2, 1)',
|
|
313
|
+
boxShadow: '0px 0px 0px 1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
|
|
314
|
+
transform: isExpanded ? 'translateX(-20px)' : 'translateX(216px)',
|
|
315
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
|
316
|
+
WebkitTextSizeAdjust: '100%',
|
|
317
|
+
fontSmooth: 'antialiased',
|
|
318
|
+
}, children: [showSecurityInfo && securityInfo ? ((0, jsx_runtime_1.jsx)(SecurityInfo, { securityInfo: securityInfo, showCloseDialog: handleShowCloseDialog, onClose: () => {
|
|
311
319
|
setIsExpanded(false);
|
|
312
320
|
setIsShowSecurityInfo(false);
|
|
313
321
|
} })) : ((0, jsx_runtime_1.jsx)(IconButton, { onClick: handleClick, isExpanded: isExpanded, isShowCloseDialog: showCloseDialog, showCloseDialog: handleShowCloseDialog, dataLoaded: !!securityInfo })), !isExpanded && showCloseDialog && ((0, jsx_runtime_1.jsx)(CloseDialog, { onClose: () => {
|
|
@@ -10,17 +10,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
|
|
11
11
|
import { render } from 'preact';
|
|
12
12
|
import { useEffect, useMemo, useCallback, useRef, useState } from 'preact/hooks';
|
|
13
|
-
import { EHostSecurityLevel
|
|
13
|
+
import { EHostSecurityLevel } from './type';
|
|
14
14
|
import { Logo } from './images';
|
|
15
15
|
let isInjected = false;
|
|
16
16
|
let i18n = {};
|
|
17
17
|
const logoStyle = {
|
|
18
|
-
width: '
|
|
19
|
-
height: '
|
|
18
|
+
width: '24px',
|
|
19
|
+
height: '24px',
|
|
20
20
|
};
|
|
21
21
|
const textStyle = {
|
|
22
22
|
color: 'rgba(0, 0, 0, 0.61)',
|
|
23
|
-
fontSize: '
|
|
23
|
+
fontSize: '14px',
|
|
24
24
|
marginLeft: '8px',
|
|
25
25
|
};
|
|
26
26
|
const containerId = 'onekey-floating-widget';
|
|
@@ -32,8 +32,7 @@ const removeIcon = () => {
|
|
|
32
32
|
const useOutsideClick = (ref, callback) => {
|
|
33
33
|
useEffect(() => {
|
|
34
34
|
const handleClickOutside = (event) => {
|
|
35
|
-
if (ref.current &&
|
|
36
|
-
!ref.current.contains(event.target)) {
|
|
35
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
37
36
|
callback();
|
|
38
37
|
}
|
|
39
38
|
};
|
|
@@ -60,30 +59,36 @@ function CloseDialog({ onClose }) {
|
|
|
60
59
|
removeIcon();
|
|
61
60
|
}, []);
|
|
62
61
|
return (_jsxs("div", { style: {
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
display: 'flex',
|
|
63
|
+
flexDirection: 'column',
|
|
64
|
+
gap: '8px',
|
|
65
|
+
padding: '12px',
|
|
65
66
|
position: 'absolute',
|
|
66
|
-
right: '
|
|
67
|
-
|
|
68
|
-
top: '
|
|
69
|
-
width: '
|
|
70
|
-
borderRadius: '
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
right: '100%',
|
|
68
|
+
background: '#fff',
|
|
69
|
+
top: '40px',
|
|
70
|
+
width: '196px',
|
|
71
|
+
borderRadius: '12px',
|
|
72
|
+
boxShadow: '0px 0px 0px 1px rgba(0, 0, 0, 0.05),0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
|
|
73
|
+
color: 'rgba(0, 0, 0, 1)',
|
|
74
|
+
fontSize: '12px',
|
|
75
|
+
lineHeight: '16px',
|
|
76
|
+
}, ref: dialogRef, children: [_jsxs("div", { style: {
|
|
77
|
+
display: 'flex',
|
|
78
|
+
alignItems: 'center',
|
|
75
79
|
cursor: 'pointer',
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
fontSize: '12px',
|
|
81
|
-
fontWeight: '400',
|
|
80
|
+
gap: '8px',
|
|
81
|
+
}, onClick: handleHideOnSite, children: [_jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M2.29312 2.2929C2.68364 1.90237 3.31681 1.90237 3.70734 2.29289L7.35069 5.9362L21.7073 20.2929C22.0979 20.6834 22.0979 21.3166 21.7073 21.7071C21.3168 22.0976 20.6836 22.0976 20.2931 21.7071L17.2031 18.617C14.684 20.0216 11.8704 20.363 9.19337 19.6107C6.27083 18.7893 3.59188 16.6894 1.6441 13.4178C1.12514 12.5461 1.12292 11.4579 1.64298 10.5841C2.63083 8.92441 3.8063 7.56606 5.10844 6.52239L2.29313 3.70711C1.9026 3.31659 1.9026 2.68342 2.29312 2.2929ZM6.53283 7.94678L7.41812 8.8321L8.5542 9.96818C8.20253 10.5636 8.00023 11.2586 8.00023 12C8.00023 14.2091 9.79109 16 12.0002 16C12.7416 16 13.4366 15.7977 14.0321 15.446L15.7203 17.1343C13.7862 18.0642 11.7083 18.24 9.73447 17.6852C7.37839 17.0231 5.08952 15.2953 3.36259 12.3947C3.21773 12.1514 3.21796 11.8483 3.36159 11.607C4.28389 10.0575 5.36713 8.84257 6.53283 7.94678ZM12.5184 13.9324L10.0678 11.4818C10.0237 11.647 10.0002 11.8207 10.0002 12C10.0002 13.1046 10.8957 14 12.0002 14C12.1796 14 12.3532 13.9765 12.5184 13.9324ZM20.6388 11.6068C18.1001 7.34166 14.3527 5.6013 10.8782 6.07652C10.331 6.15137 9.82679 5.76845 9.75195 5.22126C9.67711 4.67407 10.06 4.16981 10.6072 4.09497C15.0162 3.49193 19.4849 5.75792 22.3574 10.5838C22.8767 11.4564 22.8771 12.5429 22.3576 13.4157C21.9613 14.0815 21.535 14.6987 21.0823 15.2666C20.738 15.6985 20.1088 15.7695 19.677 15.4253C19.2451 15.081 19.1741 14.4519 19.5183 14.02C19.9123 13.5257 20.2873 12.9836 20.6389 12.3928C20.7831 12.1507 20.7831 11.8493 20.6388 11.6068Z", fill: "rgba(0, 0, 0, 0.61)" }) }), _jsx("div", { children: i18n.hideOnThisSite })] }), _jsxs("div", { style: {
|
|
82
|
+
display: 'flex',
|
|
83
|
+
alignItems: 'center',
|
|
82
84
|
cursor: 'pointer',
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
gap: '8px',
|
|
86
|
+
}, onClick: handleDisable, children: [_jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12 4C7.58172 4 4 7.58172 4 12C4 13.8491 4.62644 15.5506 5.68009 16.9057L16.9057 5.68009C15.5506 4.62644 13.8491 4 12 4ZM18.3199 7.0943L7.0943 18.3199C8.44939 19.3736 10.1509 20 12 20C16.4183 20 20 16.4183 20 12C20 10.1509 19.3736 8.44939 18.3199 7.0943ZM2 12C2 6.47715 6.47715 2 12 2C14.7611 2 17.2625 3.12038 19.0711 4.92893C20.8796 6.73748 22 9.23885 22 12C22 17.5228 17.5228 22 12 22C9.23885 22 6.73748 20.8796 4.92893 19.0711C3.12038 17.2625 2 14.7611 2 12Z", fill: "rgba(0, 0, 0, 0.61)" }) }), _jsx("div", { children: i18n.disable })] }), _jsx("div", { style: {
|
|
87
|
+
color: 'rgba(0, 0, 0, 0.61)',
|
|
88
|
+
fontSize: '12px',
|
|
89
|
+
lineHeight: '16px',
|
|
90
|
+
paddingTop: '8px',
|
|
91
|
+
borderTop: '1px solid rgba(0, 0, 0, 0.05)',
|
|
87
92
|
}, children: i18n.canBeReEnabledInSettings })] }));
|
|
88
93
|
}
|
|
89
94
|
function IconButton({ isExpanded, onClick, dataLoaded, isShowCloseDialog, showCloseDialog, }) {
|
|
@@ -91,10 +96,8 @@ function IconButton({ isExpanded, onClick, dataLoaded, isShowCloseDialog, showCl
|
|
|
91
96
|
return (_jsxs("div", { style: {
|
|
92
97
|
display: 'flex',
|
|
93
98
|
alignItems: 'center',
|
|
94
|
-
width: '184px',
|
|
95
99
|
position: 'relative',
|
|
96
100
|
cursor: 'pointer',
|
|
97
|
-
padding: '8px',
|
|
98
101
|
}, onMouseEnter: () => {
|
|
99
102
|
if (isExpanded || isShowCloseDialog) {
|
|
100
103
|
return;
|
|
@@ -106,32 +109,36 @@ function IconButton({ isExpanded, onClick, dataLoaded, isShowCloseDialog, showCl
|
|
|
106
109
|
}
|
|
107
110
|
setIsShowCloseButton(false);
|
|
108
111
|
onClick();
|
|
109
|
-
}, children: [_jsx(Logo, { style: logoStyle }), !dataLoaded &&
|
|
112
|
+
}, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', padding: '8px' }, children: [_jsx(Logo, { style: logoStyle }), !dataLoaded && _jsx("span", { style: textStyle, children: isExpanded ? i18n.fetchingDAppInfo : '' })] }), _jsx("div", { style: {
|
|
113
|
+
display: 'flex',
|
|
114
|
+
padding: '$4',
|
|
110
115
|
position: 'absolute',
|
|
111
|
-
left: '
|
|
116
|
+
left: '-6px',
|
|
112
117
|
bottom: '-10px',
|
|
118
|
+
transition: 'all 150ms cubic-bezier(0.4, 0, 0.2, 1)',
|
|
113
119
|
opacity: showCloseButton ? 1 : 0,
|
|
120
|
+
borderRadius: '9999px',
|
|
121
|
+
backgroundColor: '#fff',
|
|
122
|
+
border: '1px solid rgba(0, 0, 0, 0.1)',
|
|
114
123
|
}, onClick: (event) => {
|
|
115
124
|
event.stopPropagation();
|
|
116
125
|
setIsShowCloseButton(false);
|
|
117
126
|
showCloseDialog();
|
|
118
|
-
}, children: _jsx("svg", { width: "
|
|
127
|
+
}, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.29289 7.29289C7.68342 6.90237 8.31658 6.90237 8.70711 7.29289L12 10.5858L15.2929 7.29289C15.6834 6.90237 16.3166 6.90237 16.7071 7.29289C17.0976 7.68342 17.0976 8.31658 16.7071 8.70711L13.4142 12L16.7071 15.2929C17.0976 15.6834 17.0976 16.3166 16.7071 16.7071C16.3166 17.0976 15.6834 17.0976 15.2929 16.7071L12 13.4142L8.70711 16.7071C8.31658 17.0976 7.68342 17.0976 7.29289 16.7071C6.90237 16.3166 6.90237 15.6834 7.29289 15.2929L10.5858 12L7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289Z", fill: "rgba(0, 0, 0, 0.61)" }) }) })] }));
|
|
119
128
|
}
|
|
120
|
-
function SecurityInfoRow({ title, children
|
|
129
|
+
function SecurityInfoRow({ title, children }) {
|
|
121
130
|
return (_jsxs("div", { style: {
|
|
122
131
|
display: 'flex',
|
|
123
|
-
height: '16px',
|
|
124
132
|
flexDirection: 'row',
|
|
125
133
|
justifyContent: 'space-between',
|
|
126
134
|
alignItems: 'center',
|
|
127
|
-
padding: '0 8px',
|
|
128
135
|
}, children: [_jsx("span", { style: {
|
|
129
136
|
color: 'rgba(0, 0, 0, 0.61)',
|
|
130
|
-
|
|
131
|
-
|
|
137
|
+
fontSize: '12px',
|
|
138
|
+
lineHeight: '16px',
|
|
132
139
|
}, children: title }), children] }));
|
|
133
140
|
}
|
|
134
|
-
function SecurityRiskDetectionRow({ securityInfo
|
|
141
|
+
function SecurityRiskDetectionRow({ securityInfo }) {
|
|
135
142
|
const { securityElement, securityStatus } = useMemo(() => {
|
|
136
143
|
const security = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => item.riskLevel === EHostSecurityLevel.Security).map((item) => item.name).join(' & ')) || '';
|
|
137
144
|
if (security) {
|
|
@@ -140,8 +147,9 @@ function SecurityRiskDetectionRow({ securityInfo, }) {
|
|
|
140
147
|
securityElement: (_jsxs(_Fragment, { children: [_jsx("span", { style: {
|
|
141
148
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
142
149
|
fontWeight: '500',
|
|
143
|
-
fontSize: '
|
|
144
|
-
|
|
150
|
+
fontSize: '12px',
|
|
151
|
+
lineHeight: '16px',
|
|
152
|
+
}, children: i18n.verifiedSite }), _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { width: "16", height: "16", viewBox: "0 0 24 24", d: "M10.4673 2.69869C11.2767 1.76711 12.7232 1.7671 13.5326 2.69868L14.8908 4.26193C14.8977 4.26983 14.9082 4.27364 14.9185 4.272L16.9638 3.94755C18.1827 3.7542 19.2907 4.68395 19.3119 5.91786L19.3476 7.98845C19.3478 7.99891 19.3533 8.00854 19.3623 8.01393L21.1377 9.08009C22.1956 9.71544 22.4468 11.1399 21.6699 12.0988L20.3663 13.7079C20.3597 13.716 20.3578 13.7269 20.3612 13.7368L21.0359 15.6947C21.4379 16.8615 20.7147 18.1142 19.5032 18.3493L17.4703 18.744C17.46 18.746 17.4515 18.7531 17.4478 18.7629L16.7061 20.6964C16.2641 21.8487 14.9049 22.3434 13.8257 21.7448L12.0147 20.7404C12.0055 20.7353 11.9944 20.7353 11.9852 20.7404L10.1742 21.7448C9.09503 22.3434 7.73582 21.8487 7.29383 20.6964L6.55216 18.7629C6.54841 18.7531 6.53989 18.746 6.52962 18.744L4.49668 18.3493C3.2852 18.1142 2.56198 16.8615 2.96404 15.6947L3.63873 13.7368C3.64214 13.7269 3.64021 13.716 3.63362 13.7079L2.32998 12.0988C1.55311 11.1399 1.80428 9.71544 2.86226 9.08009L4.63762 8.01393C4.64659 8.00854 4.65215 7.99891 4.65233 7.98845L4.68797 5.91786C4.70921 4.68395 5.81725 3.7542 7.0361 3.94755L9.08142 4.272C9.09176 4.27364 9.10221 4.26983 9.10907 4.26193L10.4673 2.69869ZM15.2071 11.2071C15.5976 10.8166 15.5976 10.1834 15.2071 9.79289C14.8166 9.40237 14.1834 9.40237 13.7929 9.79289L11 12.5858L10.2071 11.7929C9.81655 11.4024 9.18339 11.4024 8.79286 11.7929C8.40234 12.1834 8.40234 12.8166 8.79286 13.2071L9.93931 14.3536C10.5251 14.9393 11.4748 14.9393 12.0606 14.3536L15.2071 11.2071Z", fill: "#006B3B", fillOpacity: "0.906" }) })] })),
|
|
145
153
|
};
|
|
146
154
|
}
|
|
147
155
|
const highSecurity = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => item.riskLevel === EHostSecurityLevel.High).map((item) => item.name).join(' & ')) || '';
|
|
@@ -151,7 +159,8 @@ function SecurityRiskDetectionRow({ securityInfo, }) {
|
|
|
151
159
|
securityElement: (_jsxs(_Fragment, { children: [_jsx("span", { style: {
|
|
152
160
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
153
161
|
fontWeight: '500',
|
|
154
|
-
fontSize: '
|
|
162
|
+
fontSize: '12px',
|
|
163
|
+
lineHeight: '16px',
|
|
155
164
|
}, children: i18n.maliciousSiteWarning }), _jsx("svg", { width: "18", height: "16", viewBox: "0 0 18 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.83981 2.21151C7.8045 0.557753 10.194 0.557748 11.1587 2.21151L17.007 12.2371C17.9792 13.9038 16.777 15.9968 14.8475 15.9968H3.15098C1.22151 15.9968 0.0193263 13.9038 0.991535 12.2371L6.83981 2.21151ZM9.00008 5.99683C9.46032 5.99683 9.83342 6.36992 9.83342 6.83016V9.33016C9.83342 9.7904 9.46032 10.1635 9.00008 10.1635C8.53984 10.1635 8.16675 9.7904 8.16675 9.33016V6.83016C8.16675 6.36992 8.53984 5.99683 9.00008 5.99683ZM7.95842 11.8302C7.95842 11.2549 8.42478 10.7885 9.00008 10.7885C9.57538 10.7885 10.0417 11.2549 10.0417 11.8302C10.0417 12.4055 9.57538 12.8718 9.00008 12.8718C8.42478 12.8718 7.95842 12.4055 7.95842 11.8302Z", fill: "#BB0007", fillOpacity: "0.836" }) })] })),
|
|
156
165
|
};
|
|
157
166
|
}
|
|
@@ -162,7 +171,8 @@ function SecurityRiskDetectionRow({ securityInfo, }) {
|
|
|
162
171
|
securityElement: (_jsxs(_Fragment, { children: [_jsx("span", { style: {
|
|
163
172
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
164
173
|
fontWeight: '500',
|
|
165
|
-
fontSize: '
|
|
174
|
+
fontSize: '12px',
|
|
175
|
+
lineHeight: '16px',
|
|
166
176
|
}, children: i18n.suspectedMaliciousBehavior }), _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.96786 0.159913C3.52858 0.159899 3.14962 0.159886 2.83748 0.185389C2.50802 0.212306 2.18034 0.271736 1.86503 0.432398C1.39462 0.672081 1.01217 1.05453 0.772486 1.52494C0.611824 1.84025 0.552394 2.16794 0.525477 2.49739C0.499974 2.80953 0.499986 3.18849 0.500001 3.62776V11.692C0.499986 12.1313 0.499974 12.5103 0.525477 12.8224C0.552394 13.1519 0.611824 13.4796 0.772486 13.7949C1.01217 14.2653 1.39462 14.6477 1.86503 14.8874C2.18034 15.0481 2.50802 15.1075 2.83748 15.1344C3.14962 15.1599 3.52858 15.1599 3.96786 15.1599H12.0321C12.4714 15.1599 12.8504 15.1599 13.1625 15.1344C13.492 15.1075 13.8197 15.0481 14.135 14.8874C14.6054 14.6477 14.9878 14.2653 15.2275 13.7949C15.3882 13.4796 15.4476 13.1519 15.4745 12.8224C15.5 12.5103 15.5 12.1313 15.5 11.6921V3.62778C15.5 3.18849 15.5 2.80953 15.4745 2.49739C15.4476 2.16794 15.3882 1.84025 15.2275 1.52494C14.9878 1.05453 14.6054 0.672081 14.135 0.432398C13.8197 0.271736 13.492 0.212306 13.1625 0.185389C12.8504 0.159886 12.4714 0.159899 12.0322 0.159913H3.96786ZM6.33333 6.82658C6.33333 6.36634 6.70643 5.99325 7.16667 5.99325H8C8.46024 5.99325 8.83333 6.36634 8.83333 6.82658V10.9932C8.83333 11.4535 8.46024 11.8266 8 11.8266C7.53976 11.8266 7.16667 11.4535 7.16667 10.9932V7.65991C6.70643 7.65991 6.33333 7.28682 6.33333 6.82658ZM8 3.49325C7.53976 3.49325 7.16667 3.86634 7.16667 4.32658C7.16667 4.78682 7.53976 5.15991 8 5.15991C8.46024 5.15991 8.83333 4.78682 8.83333 4.32658C8.83333 3.86634 8.46024 3.49325 8 3.49325Z", fill: "#5E4200", fillOpacity: "0.844" }) })] })),
|
|
167
177
|
};
|
|
168
178
|
}
|
|
@@ -171,7 +181,8 @@ function SecurityRiskDetectionRow({ securityInfo, }) {
|
|
|
171
181
|
securityElement: (_jsx("span", { style: {
|
|
172
182
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
173
183
|
fontWeight: '500',
|
|
174
|
-
fontSize: '
|
|
184
|
+
fontSize: '12px',
|
|
185
|
+
lineHeight: '16px',
|
|
175
186
|
}, children: i18n.unknown })),
|
|
176
187
|
};
|
|
177
188
|
}, [securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources]);
|
|
@@ -188,34 +199,30 @@ function SecurityInfo({ securityInfo, onClose, showCloseDialog, }) {
|
|
|
188
199
|
return (_jsxs("div", { ref: viewRef, style: {
|
|
189
200
|
display: 'flex',
|
|
190
201
|
flexDirection: 'column',
|
|
191
|
-
width: '234px',
|
|
192
|
-
borderTopLeftRadius: '12px',
|
|
193
|
-
borderBottomLeftRadius: '12px',
|
|
194
|
-
paddingTop: '8px',
|
|
195
202
|
}, children: [_jsxs("div", { style: {
|
|
196
203
|
display: 'flex',
|
|
197
204
|
flexDirection: 'column',
|
|
198
|
-
gap: '8px',
|
|
199
205
|
}, children: [_jsxs("div", { style: {
|
|
200
|
-
padding: '
|
|
206
|
+
padding: '8px',
|
|
201
207
|
display: 'flex',
|
|
202
208
|
alignItems: 'center',
|
|
203
209
|
flexDirection: 'row',
|
|
204
210
|
justifyContent: 'space-between',
|
|
211
|
+
borderBottom: '1px solid rgba(0, 0, 0, 0.05)',
|
|
205
212
|
}, children: [_jsxs("div", { style: {
|
|
206
213
|
display: 'flex',
|
|
207
214
|
flexDirection: 'row',
|
|
208
215
|
alignItems: 'center',
|
|
209
216
|
gap: '8px',
|
|
210
217
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
211
|
-
fontSize: '
|
|
218
|
+
fontSize: '14px',
|
|
212
219
|
fontWeight: '500',
|
|
213
220
|
overflow: 'hidden',
|
|
214
221
|
}, children: [((_a = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _a === void 0 ? void 0 : _a.logo) ? (_jsx("img", { src: (_b = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _b === void 0 ? void 0 : _b.logo, style: {
|
|
215
222
|
height: '24px',
|
|
216
223
|
width: '24px',
|
|
217
|
-
borderRadius: '
|
|
218
|
-
} })) : (_jsxs("svg", {
|
|
224
|
+
borderRadius: '8px',
|
|
225
|
+
} })) : (_jsxs("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
219
226
|
width: '24px',
|
|
220
227
|
height: '24px',
|
|
221
228
|
}, children: [_jsx("path", { d: "M6.6234 6.17768C6.6234 4.79769 7.73338 3.66333 9.1234 3.66333C10.5134 3.66333 11.6234 4.79769 11.6234 6.17768C11.6234 7.30559 10.8798 7.89399 10.4435 8.19056C10.3054 8.28442 10.2138 8.36716 10.1499 8.45311C10.092 8.53086 10.0368 8.63774 10.0107 8.81185C9.92866 9.35801 9.41941 9.73426 8.87325 9.65224C8.3271 9.57021 7.95084 9.06096 8.03287 8.5148C8.19122 7.4605 8.81104 6.8819 9.31912 6.53656C9.47624 6.42975 9.54878 6.36136 9.58594 6.31084C9.60107 6.29027 9.60813 6.27529 9.61242 6.26261C9.61657 6.25036 9.6234 6.22488 9.6234 6.17768C9.6234 5.88426 9.39093 5.66333 9.1234 5.66333C8.85586 5.66333 8.6234 5.88426 8.6234 6.17768C8.6234 6.72996 8.17568 7.17768 7.6234 7.17768C7.07111 7.17768 6.6234 6.72996 6.6234 6.17768Z", fill: "#3C3C3C" }), _jsx("path", { d: "M7.74976 11.5C7.74976 12.1904 8.3094 12.75 8.99976 12.75C9.69011 12.75 10.2498 12.1904 10.2498 11.5C10.2498 10.8096 9.69011 10.25 8.99976 10.25C8.3094 10.25 7.74976 10.8096 7.74976 11.5Z", fill: "#3C3C3C" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.00195 2.00272e-05L15.0019 0C16.6588 -2.7418e-06 18.002 1.34314 18.002 3V13.0358C18.002 14.6926 16.6588 16.0357 15.002 16.0358L12.3757 16.0358L8.99393 18.8375L5.65157 16.0358H3.00195C1.3451 16.0358 0.00195312 14.6926 0.00195312 13.0358V3.00002C0.00195312 1.34317 1.34509 2.2769e-05 3.00195 2.00272e-05ZM15.002 2L3.00195 2.00002C2.44967 2.00002 2.00195 2.44774 2.00195 3.00002V13.0358C2.00195 13.5881 2.44967 14.0358 3.00195 14.0358H5.65157C6.12143 14.0358 6.57629 14.2012 6.93638 14.503L9.00143 16.2341L11.0997 14.4957C11.4585 14.1984 11.9098 14.0358 12.3757 14.0358L15.002 14.0358C15.5542 14.0358 16.002 13.588 16.002 13.0358V3C16.002 2.44772 15.5542 2 15.002 2Z", fill: "#3C3C3C" })] })), _jsx("span", { style: {
|
|
@@ -223,54 +230,53 @@ function SecurityInfo({ securityInfo, onClose, showCloseDialog, }) {
|
|
|
223
230
|
overflow: 'hidden',
|
|
224
231
|
textOverflow: 'ellipsis'
|
|
225
232
|
}, children: ((_c = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _c === void 0 ? void 0 : _c.name) || (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.host) })] }), _jsx("div", { style: {
|
|
226
|
-
width: "24",
|
|
227
|
-
height: "24",
|
|
228
|
-
cursor: "pointer",
|
|
229
233
|
display: 'flex',
|
|
230
|
-
|
|
234
|
+
width: '24',
|
|
235
|
+
height: '24',
|
|
236
|
+
cursor: 'pointer',
|
|
231
237
|
}, onClick: () => {
|
|
232
238
|
onClose();
|
|
233
239
|
setTimeout(() => {
|
|
234
240
|
showCloseDialog();
|
|
235
241
|
}, 200);
|
|
236
|
-
}, children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24",
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
242
|
+
}, children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.29289 7.29289C7.68342 6.90237 8.31658 6.90237 8.70711 7.29289L12 10.5858L15.2929 7.29289C15.6834 6.90237 16.3166 6.90237 16.7071 7.29289C17.0976 7.68342 17.0976 8.31658 16.7071 8.70711L13.4142 12L16.7071 15.2929C17.0976 15.6834 17.0976 16.3166 16.7071 16.7071C16.3166 17.0976 15.6834 17.0976 15.2929 16.7071L12 13.4142L8.70711 16.7071C8.31658 17.0976 7.68342 17.0976 7.29289 16.7071C6.90237 16.3166 6.90237 15.6834 7.29289 15.2929L10.5858 12L7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289Z", fill: "rgba(0, 0, 0, 0.61)" }) }) })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', padding: '12px 8px', gap: '12px' }, children: [((_d = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _d === void 0 ? void 0 : _d.origins.length) ? (_jsx(SecurityInfoRow, { title: i18n.dappListedBy, children: _jsx("div", { style: {
|
|
243
|
+
display: 'flex',
|
|
244
|
+
alignItems: 'center',
|
|
245
|
+
gap: '2px',
|
|
246
|
+
}, children: (_e = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _e === void 0 ? void 0 : _e.origins.map((item) => (_jsx("img", { src: item.logo, style: {
|
|
247
|
+
border: '1px solid rgba(0, 0, 0, 0.1)',
|
|
248
|
+
borderRadius: '9999px',
|
|
249
|
+
width: '16px',
|
|
250
|
+
height: '16px',
|
|
251
|
+
} }))) }) })) : null, _jsx(SecurityRiskDetectionRow, { securityInfo: securityInfo }), ((_f = securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.dapp) === null || _f === void 0 ? void 0 : _f.origins.length) ? (_jsx(SecurityInfoRow, { title: i18n.lastVerifiedAt, children: _jsx("span", { style: {
|
|
252
|
+
fontWeight: '500',
|
|
253
|
+
fontSize: '12px',
|
|
254
|
+
lineHeight: '16px',
|
|
255
|
+
color: 'rgba(0, 0, 0, 0.88)',
|
|
256
|
+
}, children: securityInfo.updatedAt }) })) : null] })] }), _jsxs("div", { style: {
|
|
257
|
+
display: 'flex',
|
|
258
|
+
gap: '8px',
|
|
259
|
+
padding: '12px 8px',
|
|
260
|
+
alignItems: 'center',
|
|
261
|
+
justifyContent: 'center',
|
|
262
|
+
backgroundColor: '#F9F9F9',
|
|
256
263
|
borderBottomLeftRadius: '12px',
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
justifyContent: "center",
|
|
264
|
+
borderBottomRightRadius: '12px',
|
|
265
|
+
borderTop: '1px solid rgba(0, 0, 0, 0.05)',
|
|
260
266
|
}, children: [_jsx("span", { style: {
|
|
267
|
+
flex: 1,
|
|
261
268
|
color: 'rgba(0, 0, 0, 0.61)',
|
|
262
269
|
fontWeight: '400',
|
|
263
|
-
fontSize: '
|
|
270
|
+
fontSize: '12px',
|
|
271
|
+
lineHeight: '16px',
|
|
264
272
|
}, children: "Powered by" }), _jsx(Logo, { style: {
|
|
265
|
-
width: '
|
|
266
|
-
height: '
|
|
267
|
-
marginLeft: '5.6px',
|
|
268
|
-
marginRight: '4.2px',
|
|
269
|
-
verticalAlign: 'middle',
|
|
273
|
+
width: '14px',
|
|
274
|
+
height: '14px',
|
|
270
275
|
} }), _jsx("span", { style: {
|
|
271
276
|
color: 'rgba(0, 0, 0, 0.88)',
|
|
272
|
-
fontWeight: '
|
|
273
|
-
fontSize: '
|
|
277
|
+
fontWeight: '500',
|
|
278
|
+
fontSize: '12px',
|
|
279
|
+
lineHeight: '16px',
|
|
274
280
|
}, children: "OneKey" })] })] }));
|
|
275
281
|
}
|
|
276
282
|
function App() {
|
|
@@ -292,19 +298,21 @@ function App() {
|
|
|
292
298
|
setSecurityInfo(result.securityInfo);
|
|
293
299
|
}
|
|
294
300
|
}), [isExpanded, securityInfo]);
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
301
|
+
return (_jsxs("div", { id: containerId, style: {
|
|
302
|
+
position: 'fixed',
|
|
303
|
+
zIndex: 999999,
|
|
304
|
+
top: '75%',
|
|
305
|
+
right: '0px',
|
|
306
|
+
width: '256px',
|
|
307
|
+
background: '#fff',
|
|
308
|
+
borderRadius: '12px',
|
|
309
|
+
transition: 'all 150ms cubic-bezier(0.4, 0, 0.2, 1)',
|
|
310
|
+
boxShadow: '0px 0px 0px 1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
|
|
311
|
+
transform: isExpanded ? 'translateX(-20px)' : 'translateX(216px)',
|
|
312
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
|
313
|
+
WebkitTextSizeAdjust: '100%',
|
|
314
|
+
fontSmooth: 'antialiased',
|
|
315
|
+
}, children: [showSecurityInfo && securityInfo ? (_jsx(SecurityInfo, { securityInfo: securityInfo, showCloseDialog: handleShowCloseDialog, onClose: () => {
|
|
308
316
|
setIsExpanded(false);
|
|
309
317
|
setIsShowSecurityInfo(false);
|
|
310
318
|
} })) : (_jsx(IconButton, { onClick: handleClick, isExpanded: isExpanded, isShowCloseDialog: showCloseDialog, showCloseDialog: handleShowCloseDialog, dataLoaded: !!securityInfo })), !isExpanded && showCloseDialog && (_jsx(CloseDialog, { onClose: () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/inpage-providers-hub",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cross-inpage-provider"
|
|
6
6
|
],
|
|
@@ -30,26 +30,26 @@
|
|
|
30
30
|
"start": "tsc --watch"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@onekeyfe/cross-inpage-provider-core": "2.2.
|
|
34
|
-
"@onekeyfe/cross-inpage-provider-types": "2.2.
|
|
35
|
-
"@onekeyfe/onekey-algo-provider": "2.2.
|
|
36
|
-
"@onekeyfe/onekey-alph-provider": "2.2.
|
|
37
|
-
"@onekeyfe/onekey-aptos-provider": "2.2.
|
|
38
|
-
"@onekeyfe/onekey-bfc-provider": "2.2.
|
|
39
|
-
"@onekeyfe/onekey-btc-provider": "2.2.
|
|
40
|
-
"@onekeyfe/onekey-cardano-provider": "2.2.
|
|
41
|
-
"@onekeyfe/onekey-conflux-provider": "2.2.
|
|
42
|
-
"@onekeyfe/onekey-cosmos-provider": "2.2.
|
|
43
|
-
"@onekeyfe/onekey-eth-provider": "2.2.
|
|
44
|
-
"@onekeyfe/onekey-nostr-provider": "2.2.
|
|
45
|
-
"@onekeyfe/onekey-polkadot-provider": "2.2.
|
|
46
|
-
"@onekeyfe/onekey-private-provider": "2.2.
|
|
47
|
-
"@onekeyfe/onekey-scdo-provider": "2.2.
|
|
48
|
-
"@onekeyfe/onekey-solana-provider": "2.2.
|
|
49
|
-
"@onekeyfe/onekey-sui-provider": "2.2.
|
|
50
|
-
"@onekeyfe/onekey-ton-provider": "2.2.
|
|
51
|
-
"@onekeyfe/onekey-tron-provider": "2.2.
|
|
52
|
-
"@onekeyfe/onekey-webln-provider": "2.2.
|
|
33
|
+
"@onekeyfe/cross-inpage-provider-core": "2.2.2",
|
|
34
|
+
"@onekeyfe/cross-inpage-provider-types": "2.2.2",
|
|
35
|
+
"@onekeyfe/onekey-algo-provider": "2.2.2",
|
|
36
|
+
"@onekeyfe/onekey-alph-provider": "2.2.2",
|
|
37
|
+
"@onekeyfe/onekey-aptos-provider": "2.2.2",
|
|
38
|
+
"@onekeyfe/onekey-bfc-provider": "2.2.2",
|
|
39
|
+
"@onekeyfe/onekey-btc-provider": "2.2.2",
|
|
40
|
+
"@onekeyfe/onekey-cardano-provider": "2.2.2",
|
|
41
|
+
"@onekeyfe/onekey-conflux-provider": "2.2.2",
|
|
42
|
+
"@onekeyfe/onekey-cosmos-provider": "2.2.2",
|
|
43
|
+
"@onekeyfe/onekey-eth-provider": "2.2.2",
|
|
44
|
+
"@onekeyfe/onekey-nostr-provider": "2.2.2",
|
|
45
|
+
"@onekeyfe/onekey-polkadot-provider": "2.2.2",
|
|
46
|
+
"@onekeyfe/onekey-private-provider": "2.2.2",
|
|
47
|
+
"@onekeyfe/onekey-scdo-provider": "2.2.2",
|
|
48
|
+
"@onekeyfe/onekey-solana-provider": "2.2.2",
|
|
49
|
+
"@onekeyfe/onekey-sui-provider": "2.2.2",
|
|
50
|
+
"@onekeyfe/onekey-ton-provider": "2.2.2",
|
|
51
|
+
"@onekeyfe/onekey-tron-provider": "2.2.2",
|
|
52
|
+
"@onekeyfe/onekey-webln-provider": "2.2.2",
|
|
53
53
|
"preact": "^10.25.1",
|
|
54
54
|
"web3": "^1.7.3"
|
|
55
55
|
},
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"@types/node": "^20.12.7",
|
|
59
59
|
"playwright": "^1.43.1"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "c8e8c48be31f7ab33e4f38edd2cb5230a085563b"
|
|
62
62
|
}
|