@onekeyfe/inpage-providers-hub 2.2.4 → 2.2.6

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.
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Logo = void 0;
3
+ exports.MediumRsik = exports.HighRisk = exports.Logo = void 0;
4
4
  const jsx_runtime_1 = require("preact/jsx-runtime");
5
5
  /* eslint-disable @typescript-eslint/no-unsafe-assignment */
6
6
  const Logo = ({ style }) => ((0, jsx_runtime_1.jsx)("img", { alt: "OneKey Logo", style: style, src: "data:image/webp;base64,UklGRswEAABXRUJQVlA4WAoAAAAQAAAALwAALwAAQUxQSCgDAAABoGTbtuq6OdLTNzPbxXCJoehehJlKbkKYmZMGMDPUmZmZOWaM3tN9axXuvVKaEBETEPXhvIhYdOw5Nz35xld//wf//f3Vm0/edO6xiyJi3jBmHsxFLD7poZ/9H39+6KRFEXODGZphLL/iN9WubbvUo/Spa8ed6m9XrohhM9Uo4oKtmtqut47FvmuTbj0/YjTFXMx7StuEIrnUVVKrT82LucooVnxqmwQBpCpI0dT6yYoYFZqY94kHEAEpioW6HPCTedFExGAYT3nAgiAguRRFBA/4VAwHEXNxgS1SFdQMC1O2XhBzMYwV20wCgswuCAImt66I4by4ylYyQRAsZ4CCgK1XxbxY8rsJEBAQLFMUkGLy9yURp5goSXkaC5ILyVMiHrGVXFGclrKiKLY+Ekt+tSuoACI1MxVAtPPXJSdor1QFhApSFdReT7jQTgRBM5lB0Ayw84LbbAXQkhkVQEsKtt72bEFUBMGaIiqCYPbsu04EECqIZQChAk589zuTIAioIDURBFQQk99ttS8IIgKiKIAIIgLau3UsqqCAgoIqqqCABXAMKAKCIGKdXBDEDGRKEcBZQAQkHwvmILnToyC5II632otK2VmkqoC9W783SVnyAgg1KarJH953UhIUVMGMgqAg4MQPXrQTpCiWcovkAoidL91rK3WhJAJTCWDrPVvsNBNrkltERDDr3LJZ+kI9M6NUFexx89q/nAiCYE2sgiC5E/9aE8/ZSq4gUKgDChZan4u4yAmAgBSnAgEpJy+K2LTVVJJcmElySW7dFKO421YARXEqBFAUsfXuGA3jkL32ggogoohQUMnt3XtIDKOJS+ykLCgIYKko2HpJNBGDmPeKYwXNchFLgiKOfWVeDCKiiYN+cawlZUYtOPaXg6KJvIljfrXrRRAEFEVEBfvOX4+JJspNHPGmdj0ouQgKoNB3+uYR0US9ieXX79fUJTAHsdinLun+65dHE9M2ESfev0tl0k1S6rM+TSbdBHXXfSdGNDH9YBhx1MUv77CK9R0vX3x0xHAQMw8HEYuOPOO6x1778redLbQ7f/vytceuPeOoRRGDYdQBVlA4IH4BAACQCACdASowADAAPpE2lkiloqIhMdZqALASCWkABRXm1xMlLv4/sMpVEDsQhAZmdBuj/t2DLLfSj9jeN2h/33kRqlO8uEYD82VJykmZgAD++u9Yi1iq75P1V2sgP+qtpKI6W2w+S89zFwU6NocVAgS4Ahpa8cwJdBVEzwmXPHuS+Bkf1jepfuaBisZjtz5k66v9TsX4ZHJ5vxopXrXVhzZQUpWcle5eRr0hlxA/4qZCdCu7tBQ5hgNercW+3c8xj+8Y/zuF1X58pDYUF3k54O/II2gG8Dqeo/A55jNiCpze2OAuo27ogApJXra1b+faewFXX38yPcZcdAUmJbAX3uojPiByizCXOCi4wxWsVeiO7lp3pZm8f0ZyYUdSt4Zp0OC1vqmHm6T91y+5ksk6nQ1HLhk4+cITpVoLHyAFiOAJR65xrUvCXEZkm4vPDlcD+/++gTsKJ77gEkOU8XBObUsURriu7kcnYOLmxbgVkhgyFKQgHakg1e2tS8mJzSAA" }));
7
7
  exports.Logo = Logo;
8
+ const HighRisk = ({ style }) => ((0, jsx_runtime_1.jsx)("img", { style: style, src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAgCAYAAACYTcH3AAACrElEQVRYCe1XvW5TMRT+fFMCBNGBNQ8AL8CAxERLB6ZIzJGY6QO0UmekdkViBqkrAxNDaF+AvkBfAEYGQgsq3GvOZ/cqvonta1uRWPAS/xyf893j7/wE+D/8HlD+7bTdEwwnDaqJgn54feNc5sfbuPqQpqErVQzmE4b7gJp21bUrffwUV4ftKvW3ShV05eiRMBBKqqmVcW/1z7M98xH3Noe4eK+BcUy9hpr/wWjnGb59j8m5Z9me2cDFtA8IDQh37lLWNdY3z/LMKW6PGzSzPqXtOb0zgHq+hZ9f2r3Yb5ZnNPTLmLLlM3qnhn61vB9aJ4MhIQWMEDdvMOxPMGpDP3o5GYywIMsrrtUGdZJ3ksDMcCuJtC4Ady7EHM9wc9fd8817wZC0FXQwKhqor79x51GFakcMnPuM2D01ZVoInwO9YEjaWCgP0LxhLmHEsBSEjJHMN/Aj+tRRMPRKCWlDgGxmDpM5CkajeRtWXHYieSrInSAYG8rxlF8Cx4Y6a9vq8IKxRCsP5VUz3R1pO/Z9ZPaCSa0/XRPpK5LZV7dWwJC0kheirHfNSqQ9WKyrpExr5dWUthZ3gQ13wXlu/WGESFI0gORuMhh6pwaYmV/QLkfHM6X1R5QwxyT3Lda0aTM6dWvJM/mkVRgcbOPS9LwsiBr1u9ZYyu913WL2XnimpP6wX2mBUJnMz+R7szzk1i3zTH31h4Z8g+/uktDOdbT++PSQdwx180zSAD0hQr9gfLeWLC1ePaKUZOy9uLT/lB9V4XJiwCgoiQIJ0oJhP0K/5tUyDdaoALlvnkmQzQtwrPWKtCKbBkwT7UPWajOorII6NWBG+CWhmRcFQa0FB2zQ5HXODJjHwFwmB/8CENOD5KpD25w5X8LQZDmQZ9siw52jtU8tCP1Z2tWj9n/VX19Qwam7VmWvAAAAAElFTkSuQmCC" }));
9
+ exports.HighRisk = HighRisk;
10
+ const MediumRsik = ({ style }) => ((0, jsx_runtime_1.jsx)("img", { style: style, src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAfCAYAAAAfrhY5AAABk0lEQVRIDe2XPU7DQBCF3zqRaEgukAuEAyS0AaWhA1qkhJ5cAA6DZEu0IaKhAQ4QDoAvkAvEDRTx8mbJILceJyshsZK1uyPNfLMz+zN2qLSrM3TbnzhHgn5FvLOh93insWX2hpUYdWr5eoR+mSDlvKuyPfUCvqMDywCfnKJHwZzfvsFhPd6hcB4Xicw4uYkFFh7BHXazAOdkKMLIbRDghErYY7eewmODA88M5z7JNwc4ppWxjC3em+HcJ9nDM9ZyZmUcFc4L4/ci4soHFrie8w+LMqFL0bOelrYFqjpWqOpbcz5lro/ko6F4G845vMq9rN5H3XAlMJTXT+FN+tphZ547rS/MJyOMm4BFtzZ8C+xRUx6HRs0KbwRV5X+4RiJq/zfD7iq7XY6fJWTmu730mE1PfpB8YKQGrN3McFktobe1iRUFzfm6Ios2VHgRjbgFeSBX+CI2PEnwGODtQ6TMn6kINDq9Sl+QBfj9U/h9mdFQjAgsWPVeitOhhqt6L281n0wtDnfyM+FaWPsNCkJzqXiV9w3zlWKqZDoCQAAAAABJRU5ErkJggg==" }));
11
+ exports.MediumRsik = MediumRsik;
@@ -139,54 +139,44 @@ function SecurityInfoRow({ title, children }) {
139
139
  lineHeight: '16px',
140
140
  }, children: title }), children] }));
141
141
  }
142
+ const SECURITY_INFO = {
143
+ [type_1.EHostSecurityLevel.Security]: {
144
+ titleId: 'verifiedSite',
145
+ icon: ((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" }) })),
146
+ },
147
+ [type_1.EHostSecurityLevel.High]: {
148
+ titleId: 'maliciousSiteWarning',
149
+ icon: ((0, jsx_runtime_1.jsx)(images_1.HighRisk, { style: { width: 16, height: 16 } })),
150
+ },
151
+ [type_1.EHostSecurityLevel.Medium]: {
152
+ titleId: 'suspectedMaliciousBehavior',
153
+ icon: ((0, jsx_runtime_1.jsx)(images_1.MediumRsik, { style: { width: 16, height: 16 } })),
154
+ },
155
+ };
142
156
  function SecurityRiskDetectionRow({ securityInfo }) {
143
157
  const { securityElement, securityStatus } = (0, hooks_1.useMemo)(() => {
144
- const security = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => item.riskLevel === type_1.EHostSecurityLevel.Security).map((item) => item.name).join(' & ')) || '';
145
- if (security) {
158
+ if (securityInfo.level === type_1.EHostSecurityLevel.Unknown) {
146
159
  return {
147
- securityStatus: type_1.EHostSecurityLevel.Security,
148
- securityElement: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { style: {
149
- color: 'rgba(0, 0, 0, 0.88)',
150
- fontWeight: '500',
151
- fontSize: '12px',
152
- lineHeight: '16px',
153
- }, 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" }) })] })),
154
- };
155
- }
156
- const highSecurity = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => item.riskLevel === type_1.EHostSecurityLevel.High).map((item) => item.name).join(' & ')) || '';
157
- if (highSecurity) {
158
- return {
159
- securityStatus: type_1.EHostSecurityLevel.High,
160
- securityElement: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { style: {
161
- color: 'rgba(0, 0, 0, 0.88)',
162
- fontWeight: '500',
163
- fontSize: '12px',
164
- lineHeight: '16px',
165
- }, 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" }) })] })),
166
- };
167
- }
168
- const mediumSecurity = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => type_1.EHostSecurityLevel.Medium == item.riskLevel).map((item) => item.name).join(' & ')) || '';
169
- if (mediumSecurity) {
170
- return {
171
- securityStatus: type_1.EHostSecurityLevel.Medium,
172
- securityElement: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { style: {
173
- color: 'rgba(0, 0, 0, 0.88)',
174
- fontWeight: '500',
175
- fontSize: '12px',
176
- lineHeight: '16px',
177
- }, 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" }) })] })),
160
+ securityStatus: type_1.EHostSecurityLevel.Unknown,
161
+ securityElement: ((0, jsx_runtime_1.jsx)("span", { style: {
162
+ color: 'rgba(0, 0, 0, 0.88)',
163
+ fontWeight: '500',
164
+ fontSize: '12px',
165
+ lineHeight: '16px',
166
+ }, children: i18n.unknown })),
178
167
  };
179
168
  }
169
+ const securityInfoItem = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.level) ? SECURITY_INFO[securityInfo.level] : undefined;
180
170
  return {
181
- securityStatus: type_1.EHostSecurityLevel.Unknown,
182
- securityElement: ((0, jsx_runtime_1.jsx)("span", { style: {
183
- color: 'rgba(0, 0, 0, 0.88)',
184
- fontWeight: '500',
185
- fontSize: '12px',
186
- lineHeight: '16px',
187
- }, children: i18n.unknown })),
171
+ securityStatus: securityInfo.level,
172
+ securityElement: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { style: {
173
+ color: 'rgba(0, 0, 0, 0.88)',
174
+ fontWeight: '500',
175
+ fontSize: '12px',
176
+ lineHeight: '16px',
177
+ }, children: securityInfoItem ? i18n[securityInfoItem.titleId] : i18n.unknown }), securityInfoItem ? securityInfoItem.icon : null] }))
188
178
  };
189
- }, [securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources]);
179
+ }, [securityInfo]);
190
180
  return ((0, jsx_runtime_1.jsx)(SecurityInfoRow, { title: i18n.riskDetection, children: (0, jsx_runtime_1.jsx)("div", { style: {
191
181
  display: 'flex',
192
182
  alignItems: 'center',
@@ -224,16 +214,12 @@ function SecurityInfo({ securityInfo, onClose, }) {
224
214
  width: '24px',
225
215
  borderRadius: '8px',
226
216
  } })) : ((0, jsx_runtime_1.jsx)("div", { style: {
227
- transform: 'translate(4px, 3px)',
228
- height: '24px',
229
- width: '24px',
217
+ height: '16px',
218
+ width: '16px',
230
219
  display: 'flex',
231
220
  alignItems: 'center',
232
221
  justifyContent: 'center'
233
- }, children: (0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", style: {
234
- width: '24px',
235
- height: '24px',
236
- }, 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: {
222
+ }, children: (0, jsx_runtime_1.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2ZM0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10Z", fill: "black", "fill-opacity": "0.447" }), (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 7C9.62267 7 9.29263 7.2086 9.12147 7.52152C8.85645 8.00606 8.24881 8.18401 7.76426 7.91899C7.27972 7.65396 7.10177 7.04632 7.36679 6.56178C7.87463 5.63331 8.86263 5 10 5C11.5147 5 12.5669 6.00643 12.8664 7.189C13.1676 8.37786 12.7101 9.76299 11.3416 10.4472C11.1323 10.5519 11 10.7659 11 11C11 11.5523 10.5523 12 10 12C9.44772 12 9 11.5523 9 11C9 10.0084 9.56027 9.10183 10.4472 8.65836C10.902 8.43099 11.0188 8.03973 10.9277 7.6801C10.835 7.31417 10.5283 7 10 7Z", fill: "black", "fill-opacity": "0.447" }), (0, jsx_runtime_1.jsx)("path", { d: "M11 14C11 14.5523 10.5523 15 10 15C9.44772 15 9 14.5523 9 14C9 13.4477 9.44772 13 10 13C10.5523 13 11 13.4477 11 14Z", fill: "black", "fill-opacity": "0.447" })] }) })), (0, jsx_runtime_1.jsx)("span", { style: {
237
223
  width: '100%',
238
224
  overflow: 'hidden',
239
225
  textOverflow: 'ellipsis'
@@ -1,3 +1,9 @@
1
1
  export declare const Logo: ({ style }: {
2
2
  style: any;
3
3
  }) => import("preact").JSX.Element;
4
+ export declare const HighRisk: ({ style }: {
5
+ style: any;
6
+ }) => import("preact").JSX.Element;
7
+ export declare const MediumRsik: ({ style }: {
8
+ style: any;
9
+ }) => import("preact").JSX.Element;
@@ -1,3 +1,5 @@
1
1
  import { jsx as _jsx } from "preact/jsx-runtime";
2
2
  /* eslint-disable @typescript-eslint/no-unsafe-assignment */
3
3
  export const Logo = ({ style }) => (_jsx("img", { alt: "OneKey Logo", style: style, src: "data:image/webp;base64,UklGRswEAABXRUJQVlA4WAoAAAAQAAAALwAALwAAQUxQSCgDAAABoGTbtuq6OdLTNzPbxXCJoehehJlKbkKYmZMGMDPUmZmZOWaM3tN9axXuvVKaEBETEPXhvIhYdOw5Nz35xld//wf//f3Vm0/edO6xiyJi3jBmHsxFLD7poZ/9H39+6KRFEXODGZphLL/iN9WubbvUo/Spa8ed6m9XrohhM9Uo4oKtmtqut47FvmuTbj0/YjTFXMx7StuEIrnUVVKrT82LucooVnxqmwQBpCpI0dT6yYoYFZqY94kHEAEpioW6HPCTedFExGAYT3nAgiAguRRFBA/4VAwHEXNxgS1SFdQMC1O2XhBzMYwV20wCgswuCAImt66I4by4ylYyQRAsZ4CCgK1XxbxY8rsJEBAQLFMUkGLy9yURp5goSXkaC5ILyVMiHrGVXFGclrKiKLY+Ekt+tSuoACI1MxVAtPPXJSdor1QFhApSFdReT7jQTgRBM5lB0Ayw84LbbAXQkhkVQEsKtt72bEFUBMGaIiqCYPbsu04EECqIZQChAk589zuTIAioIDURBFQQk99ttS8IIgKiKIAIIgLau3UsqqCAgoIqqqCABXAMKAKCIGKdXBDEDGRKEcBZQAQkHwvmILnToyC5II632otK2VmkqoC9W783SVnyAgg1KarJH953UhIUVMGMgqAg4MQPXrQTpCiWcovkAoidL91rK3WhJAJTCWDrPVvsNBNrkltERDDr3LJZ+kI9M6NUFexx89q/nAiCYE2sgiC5E/9aE8/ZSq4gUKgDChZan4u4yAmAgBSnAgEpJy+K2LTVVJJcmElySW7dFKO421YARXEqBFAUsfXuGA3jkL32ggogoohQUMnt3XtIDKOJS+ykLCgIYKko2HpJNBGDmPeKYwXNchFLgiKOfWVeDCKiiYN+cawlZUYtOPaXg6KJvIljfrXrRRAEFEVEBfvOX4+JJspNHPGmdj0ouQgKoNB3+uYR0US9ieXX79fUJTAHsdinLun+65dHE9M2ESfev0tl0k1S6rM+TSbdBHXXfSdGNDH9YBhx1MUv77CK9R0vX3x0xHAQMw8HEYuOPOO6x1778redLbQ7f/vytceuPeOoRRGDYdQBVlA4IH4BAACQCACdASowADAAPpE2lkiloqIhMdZqALASCWkABRXm1xMlLv4/sMpVEDsQhAZmdBuj/t2DLLfSj9jeN2h/33kRqlO8uEYD82VJykmZgAD++u9Yi1iq75P1V2sgP+qtpKI6W2w+S89zFwU6NocVAgS4Ahpa8cwJdBVEzwmXPHuS+Bkf1jepfuaBisZjtz5k66v9TsX4ZHJ5vxopXrXVhzZQUpWcle5eRr0hlxA/4qZCdCu7tBQ5hgNercW+3c8xj+8Y/zuF1X58pDYUF3k54O/II2gG8Dqeo/A55jNiCpze2OAuo27ogApJXra1b+faewFXX38yPcZcdAUmJbAX3uojPiByizCXOCi4wxWsVeiO7lp3pZm8f0ZyYUdSt4Zp0OC1vqmHm6T91y+5ksk6nQ1HLhk4+cITpVoLHyAFiOAJR65xrUvCXEZkm4vPDlcD+/++gTsKJ77gEkOU8XBObUsURriu7kcnYOLmxbgVkhgyFKQgHakg1e2tS8mJzSAA" }));
4
+ export const HighRisk = ({ style }) => (_jsx("img", { style: style, src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAgCAYAAACYTcH3AAACrElEQVRYCe1XvW5TMRT+fFMCBNGBNQ8AL8CAxERLB6ZIzJGY6QO0UmekdkViBqkrAxNDaF+AvkBfAEYGQgsq3GvOZ/cqvonta1uRWPAS/xyf893j7/wE+D/8HlD+7bTdEwwnDaqJgn54feNc5sfbuPqQpqErVQzmE4b7gJp21bUrffwUV4ftKvW3ShV05eiRMBBKqqmVcW/1z7M98xH3Noe4eK+BcUy9hpr/wWjnGb59j8m5Z9me2cDFtA8IDQh37lLWNdY3z/LMKW6PGzSzPqXtOb0zgHq+hZ9f2r3Yb5ZnNPTLmLLlM3qnhn61vB9aJ4MhIQWMEDdvMOxPMGpDP3o5GYywIMsrrtUGdZJ3ksDMcCuJtC4Ady7EHM9wc9fd8817wZC0FXQwKhqor79x51GFakcMnPuM2D01ZVoInwO9YEjaWCgP0LxhLmHEsBSEjJHMN/Aj+tRRMPRKCWlDgGxmDpM5CkajeRtWXHYieSrInSAYG8rxlF8Cx4Y6a9vq8IKxRCsP5VUz3R1pO/Z9ZPaCSa0/XRPpK5LZV7dWwJC0kheirHfNSqQ9WKyrpExr5dWUthZ3gQ13wXlu/WGESFI0gORuMhh6pwaYmV/QLkfHM6X1R5QwxyT3Lda0aTM6dWvJM/mkVRgcbOPS9LwsiBr1u9ZYyu913WL2XnimpP6wX2mBUJnMz+R7szzk1i3zTH31h4Z8g+/uktDOdbT++PSQdwx180zSAD0hQr9gfLeWLC1ePaKUZOy9uLT/lB9V4XJiwCgoiQIJ0oJhP0K/5tUyDdaoALlvnkmQzQtwrPWKtCKbBkwT7UPWajOorII6NWBG+CWhmRcFQa0FB2zQ5HXODJjHwFwmB/8CENOD5KpD25w5X8LQZDmQZ9siw52jtU8tCP1Z2tWj9n/VX19Qwam7VmWvAAAAAElFTkSuQmCC" }));
5
+ export const MediumRsik = ({ style }) => (_jsx("img", { style: style, src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAfCAYAAAAfrhY5AAABk0lEQVRIDe2XPU7DQBCF3zqRaEgukAuEAyS0AaWhA1qkhJ5cAA6DZEu0IaKhAQ4QDoAvkAvEDRTx8mbJILceJyshsZK1uyPNfLMz+zN2qLSrM3TbnzhHgn5FvLOh93insWX2hpUYdWr5eoR+mSDlvKuyPfUCvqMDywCfnKJHwZzfvsFhPd6hcB4Xicw4uYkFFh7BHXazAOdkKMLIbRDghErYY7eewmODA88M5z7JNwc4ppWxjC3em+HcJ9nDM9ZyZmUcFc4L4/ci4soHFrie8w+LMqFL0bOelrYFqjpWqOpbcz5lro/ko6F4G845vMq9rN5H3XAlMJTXT+FN+tphZ547rS/MJyOMm4BFtzZ8C+xRUx6HRs0KbwRV5X+4RiJq/zfD7iq7XY6fJWTmu730mE1PfpB8YKQGrN3McFktobe1iRUFzfm6Ios2VHgRjbgFeSBX+CI2PEnwGODtQ6TMn6kINDq9Sl+QBfj9U/h9mdFQjAgsWPVeitOhhqt6L281n0wtDnfyM+FaWPsNCkJzqXiV9w3zlWKqZDoCQAAAAABJRU5ErkJggg==" }));
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-ru
11
11
  import { render } from 'preact';
12
12
  import { useEffect, useMemo, useCallback, useRef, useState } from 'preact/hooks';
13
13
  import { EHostSecurityLevel } from './type';
14
- import { Logo } from './images';
14
+ import { HighRisk, Logo, MediumRsik } from './images';
15
15
  let isInjected = false;
16
16
  let i18n = {};
17
17
  const logoStyle = {
@@ -136,54 +136,44 @@ function SecurityInfoRow({ title, children }) {
136
136
  lineHeight: '16px',
137
137
  }, children: title }), children] }));
138
138
  }
139
+ const SECURITY_INFO = {
140
+ [EHostSecurityLevel.Security]: {
141
+ titleId: 'verifiedSite',
142
+ icon: (_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" }) })),
143
+ },
144
+ [EHostSecurityLevel.High]: {
145
+ titleId: 'maliciousSiteWarning',
146
+ icon: (_jsx(HighRisk, { style: { width: 16, height: 16 } })),
147
+ },
148
+ [EHostSecurityLevel.Medium]: {
149
+ titleId: 'suspectedMaliciousBehavior',
150
+ icon: (_jsx(MediumRsik, { style: { width: 16, height: 16 } })),
151
+ },
152
+ };
139
153
  function SecurityRiskDetectionRow({ securityInfo }) {
140
154
  const { securityElement, securityStatus } = useMemo(() => {
141
- const security = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => item.riskLevel === EHostSecurityLevel.Security).map((item) => item.name).join(' & ')) || '';
142
- if (security) {
155
+ if (securityInfo.level === EHostSecurityLevel.Unknown) {
143
156
  return {
144
- securityStatus: EHostSecurityLevel.Security,
145
- securityElement: (_jsxs(_Fragment, { children: [_jsx("span", { style: {
146
- color: 'rgba(0, 0, 0, 0.88)',
147
- fontWeight: '500',
148
- fontSize: '12px',
149
- lineHeight: '16px',
150
- }, 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" }) })] })),
151
- };
152
- }
153
- const highSecurity = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => item.riskLevel === EHostSecurityLevel.High).map((item) => item.name).join(' & ')) || '';
154
- if (highSecurity) {
155
- return {
156
- securityStatus: EHostSecurityLevel.High,
157
- securityElement: (_jsxs(_Fragment, { children: [_jsx("span", { style: {
158
- color: 'rgba(0, 0, 0, 0.88)',
159
- fontWeight: '500',
160
- fontSize: '12px',
161
- lineHeight: '16px',
162
- }, 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" }) })] })),
163
- };
164
- }
165
- const mediumSecurity = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources.filter((item) => EHostSecurityLevel.Medium == item.riskLevel).map((item) => item.name).join(' & ')) || '';
166
- if (mediumSecurity) {
167
- return {
168
- securityStatus: EHostSecurityLevel.Medium,
169
- securityElement: (_jsxs(_Fragment, { children: [_jsx("span", { style: {
170
- color: 'rgba(0, 0, 0, 0.88)',
171
- fontWeight: '500',
172
- fontSize: '12px',
173
- lineHeight: '16px',
174
- }, 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" }) })] })),
157
+ securityStatus: EHostSecurityLevel.Unknown,
158
+ securityElement: (_jsx("span", { style: {
159
+ color: 'rgba(0, 0, 0, 0.88)',
160
+ fontWeight: '500',
161
+ fontSize: '12px',
162
+ lineHeight: '16px',
163
+ }, children: i18n.unknown })),
175
164
  };
176
165
  }
166
+ const securityInfoItem = (securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.level) ? SECURITY_INFO[securityInfo.level] : undefined;
177
167
  return {
178
- securityStatus: EHostSecurityLevel.Unknown,
179
- securityElement: (_jsx("span", { style: {
180
- color: 'rgba(0, 0, 0, 0.88)',
181
- fontWeight: '500',
182
- fontSize: '12px',
183
- lineHeight: '16px',
184
- }, children: i18n.unknown })),
168
+ securityStatus: securityInfo.level,
169
+ securityElement: (_jsxs(_Fragment, { children: [_jsx("span", { style: {
170
+ color: 'rgba(0, 0, 0, 0.88)',
171
+ fontWeight: '500',
172
+ fontSize: '12px',
173
+ lineHeight: '16px',
174
+ }, children: securityInfoItem ? i18n[securityInfoItem.titleId] : i18n.unknown }), securityInfoItem ? securityInfoItem.icon : null] }))
185
175
  };
186
- }, [securityInfo === null || securityInfo === void 0 ? void 0 : securityInfo.checkSources]);
176
+ }, [securityInfo]);
187
177
  return (_jsx(SecurityInfoRow, { title: i18n.riskDetection, children: _jsx("div", { style: {
188
178
  display: 'flex',
189
179
  alignItems: 'center',
@@ -221,16 +211,12 @@ function SecurityInfo({ securityInfo, onClose, }) {
221
211
  width: '24px',
222
212
  borderRadius: '8px',
223
213
  } })) : (_jsx("div", { style: {
224
- transform: 'translate(4px, 3px)',
225
- height: '24px',
226
- width: '24px',
214
+ height: '16px',
215
+ width: '16px',
227
216
  display: 'flex',
228
217
  alignItems: 'center',
229
218
  justifyContent: 'center'
230
- }, children: _jsxs("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", style: {
231
- width: '24px',
232
- height: '24px',
233
- }, 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: {
219
+ }, children: _jsxs("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2ZM0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10Z", fill: "black", "fill-opacity": "0.447" }), _jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 7C9.62267 7 9.29263 7.2086 9.12147 7.52152C8.85645 8.00606 8.24881 8.18401 7.76426 7.91899C7.27972 7.65396 7.10177 7.04632 7.36679 6.56178C7.87463 5.63331 8.86263 5 10 5C11.5147 5 12.5669 6.00643 12.8664 7.189C13.1676 8.37786 12.7101 9.76299 11.3416 10.4472C11.1323 10.5519 11 10.7659 11 11C11 11.5523 10.5523 12 10 12C9.44772 12 9 11.5523 9 11C9 10.0084 9.56027 9.10183 10.4472 8.65836C10.902 8.43099 11.0188 8.03973 10.9277 7.6801C10.835 7.31417 10.5283 7 10 7Z", fill: "black", "fill-opacity": "0.447" }), _jsx("path", { d: "M11 14C11 14.5523 10.5523 15 10 15C9.44772 15 9 14.5523 9 14C9 13.4477 9.44772 13 10 13C10.5523 13 11 13.4477 11 14Z", fill: "black", "fill-opacity": "0.447" })] }) })), _jsx("span", { style: {
234
220
  width: '100%',
235
221
  overflow: 'hidden',
236
222
  textOverflow: 'ellipsis'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/inpage-providers-hub",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
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.4",
34
- "@onekeyfe/cross-inpage-provider-types": "2.2.4",
35
- "@onekeyfe/onekey-algo-provider": "2.2.4",
36
- "@onekeyfe/onekey-alph-provider": "2.2.4",
37
- "@onekeyfe/onekey-aptos-provider": "2.2.4",
38
- "@onekeyfe/onekey-bfc-provider": "2.2.4",
39
- "@onekeyfe/onekey-btc-provider": "2.2.4",
40
- "@onekeyfe/onekey-cardano-provider": "2.2.4",
41
- "@onekeyfe/onekey-conflux-provider": "2.2.4",
42
- "@onekeyfe/onekey-cosmos-provider": "2.2.4",
43
- "@onekeyfe/onekey-eth-provider": "2.2.4",
44
- "@onekeyfe/onekey-nostr-provider": "2.2.4",
45
- "@onekeyfe/onekey-polkadot-provider": "2.2.4",
46
- "@onekeyfe/onekey-private-provider": "2.2.4",
47
- "@onekeyfe/onekey-scdo-provider": "2.2.4",
48
- "@onekeyfe/onekey-solana-provider": "2.2.4",
49
- "@onekeyfe/onekey-sui-provider": "2.2.4",
50
- "@onekeyfe/onekey-ton-provider": "2.2.4",
51
- "@onekeyfe/onekey-tron-provider": "2.2.4",
52
- "@onekeyfe/onekey-webln-provider": "2.2.4",
33
+ "@onekeyfe/cross-inpage-provider-core": "2.2.6",
34
+ "@onekeyfe/cross-inpage-provider-types": "2.2.6",
35
+ "@onekeyfe/onekey-algo-provider": "2.2.6",
36
+ "@onekeyfe/onekey-alph-provider": "2.2.6",
37
+ "@onekeyfe/onekey-aptos-provider": "2.2.6",
38
+ "@onekeyfe/onekey-bfc-provider": "2.2.6",
39
+ "@onekeyfe/onekey-btc-provider": "2.2.6",
40
+ "@onekeyfe/onekey-cardano-provider": "2.2.6",
41
+ "@onekeyfe/onekey-conflux-provider": "2.2.6",
42
+ "@onekeyfe/onekey-cosmos-provider": "2.2.6",
43
+ "@onekeyfe/onekey-eth-provider": "2.2.6",
44
+ "@onekeyfe/onekey-nostr-provider": "2.2.6",
45
+ "@onekeyfe/onekey-polkadot-provider": "2.2.6",
46
+ "@onekeyfe/onekey-private-provider": "2.2.6",
47
+ "@onekeyfe/onekey-scdo-provider": "2.2.6",
48
+ "@onekeyfe/onekey-solana-provider": "2.2.6",
49
+ "@onekeyfe/onekey-sui-provider": "2.2.6",
50
+ "@onekeyfe/onekey-ton-provider": "2.2.6",
51
+ "@onekeyfe/onekey-tron-provider": "2.2.6",
52
+ "@onekeyfe/onekey-webln-provider": "2.2.6",
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": "8ed8855808d05d30e4fdc1aa4da99ac2e5bf4edb"
61
+ "gitHead": "e2eb8eab8cea220e8aca24859785047d3a0adee7"
62
62
  }