From 537ee8a971d7abe25c54a441d073bf7a86de018b Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 12 Mar 2024 14:18:36 +0800 Subject: [PATCH 1/8] Merge feat/v5-dapp commit 6228efb2a8c6fc7b639bbffda8ac103147c09fb2 Author: Leon Date: Thu Feb 15 22:45:46 2024 +0800 feat: Add $walletConnect scope commit 7fe9da03f0f492b2c4b2bec151c6b7804eee5d08 Author: Leon Date: Thu Feb 1 20:20:37 2024 +0800 chore: update version commit a4284b2fa65eab9bb81f6bfd0dc85636a359edd4 Author: Leon Date: Thu Feb 1 20:17:47 2024 +0800 chore: add type commit cfbb428665078f405418214ee4c18a2827c63ed3 Author: Leon Date: Fri Jan 19 15:34:04 2024 +0800 Update Node version in package.json and add targetOrigin parameter to requestToAllCS method --- .../src/JsBridgeExtBackground.ts | 20 ++++--- .../providers/onekey-eth-provider/yarn.lock | 58 +------------------ packages/types/src/index.ts | 2 + 3 files changed, 17 insertions(+), 63 deletions(-) diff --git a/packages/extension/extension-bridge-hosted/src/JsBridgeExtBackground.ts b/packages/extension/extension-bridge-hosted/src/JsBridgeExtBackground.ts index 7b7e91dc..dc044934 100644 --- a/packages/extension/extension-bridge-hosted/src/JsBridgeExtBackground.ts +++ b/packages/extension/extension-bridge-hosted/src/JsBridgeExtBackground.ts @@ -132,7 +132,7 @@ class JsBridgeExtBackground extends JsBridgeBase { return this.request({ data, remoteId: this.offscreenPortId }); } - requestToAllCS(scope: IInjectedProviderNamesStrings, data: unknown) { + requestToAllCS(scope: IInjectedProviderNamesStrings, data: unknown, targetOrigin?: string) { // TODO optimize rename: broadcastRequest // eslint-disable-next-line @typescript-eslint/no-misused-promises entries(this.ports).forEach(async ([portId, port]) => { @@ -142,13 +142,17 @@ class JsBridgeExtBackground extends JsBridgeBase { // eslint-disable-next-line no-param-reassign data = await data({ origin }); } - console.log(`notify to content-script port: ${portId}`, data); - // TODO check ports disconnected - this.requestSync({ - data, - scope, - remoteId: portId, - }); + console.log(`notify to content-script port: ${portId}`, data, origin, targetOrigin); + + // Send a notification to the port of the specified origin + if (!targetOrigin || targetOrigin === origin) { + // TODO check ports disconnected + this.requestSync({ + data, + scope, + remoteId: portId, + }); + } } void 0; }); diff --git a/packages/providers/onekey-eth-provider/yarn.lock b/packages/providers/onekey-eth-provider/yarn.lock index d1918d04..4e7642aa 100644 --- a/packages/providers/onekey-eth-provider/yarn.lock +++ b/packages/providers/onekey-eth-provider/yarn.lock @@ -2,44 +2,7 @@ # yarn lockfile v1 -"@onekeyfe/cross-inpage-provider-core@1.1.50": - version "1.1.50" - resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-core/-/cross-inpage-provider-core-1.1.50.tgz#6f80a13b748cc1aa00436ff02b47fd2d5edf90cc" - integrity sha512-JNZeMgGidPjqOXGX3qfprZ83ELmS22biWCoVvE1iBLvcRzCpbpjfHzCqAehE32EkQd2RwCmW9JTr/EdzPcK/lQ== - dependencies: - "@onekeyfe/cross-inpage-provider-errors" "1.1.50" - "@onekeyfe/cross-inpage-provider-events" "1.1.50" - "@onekeyfe/cross-inpage-provider-types" "1.1.50" - events "^3.3.0" - lodash "^4.17.21" - ms "^2.1.3" - -"@onekeyfe/cross-inpage-provider-errors@1.1.50": - version "1.1.50" - resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-errors/-/cross-inpage-provider-errors-1.1.50.tgz#b0b5e7707ef08c1ea41efdf2278786095d109ad7" - integrity sha512-10zaE7u5Hsh1YdEDKbpTLQHLCyL04nRsbLJHEv2lycuTPq9xxkKqvVMRKaSzOlx6RlF7JSvhzHejXJioSVfA4g== - dependencies: - fast-safe-stringify "^2.1.1" - -"@onekeyfe/cross-inpage-provider-events@1.1.50": - version "1.1.50" - resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-events/-/cross-inpage-provider-events-1.1.50.tgz#888174bd8279787186dbd92c17f9532a218c1d4b" - integrity sha512-hOeAbsnvN8DUNxSOn0zJM47f+0lyOC6c+h/klcCvwLVyumjz/myqWeWBnSFk9aArCOIXR7HxJkFJYfkz0nAcYQ== - -"@onekeyfe/cross-inpage-provider-types@1.1.50": - version "1.1.50" - resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-types/-/cross-inpage-provider-types-1.1.50.tgz#6055a81303e4653e3130d8219c49e432f38638f6" - integrity sha512-vHz8b1BvFpYjy+JGxJWwd9r/FUQF54lAyAo7pDJAcsJ4CaDX6KCbKN6MwfFY/3mCN76vs1wkBbtc/s/PMivEQg== - -"@onekeyfe/extension-bridge-injected@1.1.50": - version "1.1.50" - resolved "https://registry.yarnpkg.com/@onekeyfe/extension-bridge-injected/-/extension-bridge-injected-1.1.50.tgz#1812ccc97f161dcc485a016f39d28b71aa217119" - integrity sha512-8bCQta1UOM9NJCCby0bdagFqtgDdj2+aFyaKZ58NC9EHCwQdg8ksQDSjIY7FcTYQV6K0X7ep2aXPRKZYjS3egQ== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.50" - "@onekeyfe/cross-inpage-provider-types" "1.1.50" - -"@types/uuid@^8.3.0": +"@types/uuid@^8.3.2": version "8.3.4" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== @@ -51,27 +14,12 @@ eth-rpc-errors@^4.0.3: dependencies: fast-safe-stringify "^2.0.6" -events@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.1.1: +fast-safe-stringify@^2.0.6: version "2.1.1" resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -ms@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -uuid@^8.3.0: +uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 045e18db..aaa845cd 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -57,6 +57,7 @@ export enum IInjectedProviderNames { nostr = 'nostr', $private = '$private', $hardware_sdk = '$hardware_sdk', + $walletConnect = '$walletConnect' } export type IInjectedProviderNamesStrings = keyof typeof IInjectedProviderNames; @@ -95,6 +96,7 @@ export type IJsBridgeMessagePayload = { created?: number; sync?: boolean; internal?: boolean; + isWalletConnectRequest?: boolean; }; export type IDebugLogger = { From 312dbe9262310bd9c1db09098cf24e20b350040a Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 12 Mar 2024 14:19:01 +0800 Subject: [PATCH 2/8] chore: remove log --- .../extension-bridge-hosted/src/JsBridgeExtBackground.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/extension/extension-bridge-hosted/src/JsBridgeExtBackground.ts b/packages/extension/extension-bridge-hosted/src/JsBridgeExtBackground.ts index dc044934..01169002 100644 --- a/packages/extension/extension-bridge-hosted/src/JsBridgeExtBackground.ts +++ b/packages/extension/extension-bridge-hosted/src/JsBridgeExtBackground.ts @@ -142,8 +142,6 @@ class JsBridgeExtBackground extends JsBridgeBase { // eslint-disable-next-line no-param-reassign data = await data({ origin }); } - console.log(`notify to content-script port: ${portId}`, data, origin, targetOrigin); - // Send a notification to the port of the specified origin if (!targetOrigin || targetOrigin === origin) { // TODO check ports disconnected From a5eecfabbeb2d4bc607d0cd3d196a914e4b74504 Mon Sep 17 00:00:00 2001 From: Leon Date: Wed, 13 Mar 2024 15:22:13 +0800 Subject: [PATCH 3/8] feat: Risk detection --- packages/example/yarn.lock | 380 +----------------- .../src/detectRiskWebsite/index.ts | 169 ++++++++ .../src/detectRiskWebsite/style.ts | 217 ++++++++++ .../src/injectWeb3Provider.ts | 1 + 4 files changed, 400 insertions(+), 367 deletions(-) create mode 100644 packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts create mode 100644 packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts diff --git a/packages/example/yarn.lock b/packages/example/yarn.lock index adc2a90f..60282cfe 100644 --- a/packages/example/yarn.lock +++ b/packages/example/yarn.lock @@ -7,11 +7,6 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@adraffy/ens-normalize@1.10.0": - version "1.10.0" - resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" - integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== - "@alloc/quick-lru@^5.2.0": version "5.2.0" resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30" @@ -2144,13 +2139,6 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.4.5": - version "7.23.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.8.tgz#8ee6fe1ac47add7122902f257b8ddf55c898f650" - integrity sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw== - dependencies: - regenerator-runtime "^0.14.0" - "@babel/runtime@^7.9.2": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.0.tgz#824a9ef325ffde6f78056059db3168c08785e24a" @@ -3455,13 +3443,6 @@ dependencies: bowser "^2.9.0" -"@mysten/bcs@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@mysten/bcs/-/bcs-0.7.4.tgz#1e32ec3d1fa68a0ed98323e604a741728927e421" - integrity sha512-6DKzM4L10Au3Og5EJRBqJZmXWZ7hS/clVjbVUH4sA0aFtS3AZo2xc+r5fUFfdJbaWZUxVaDiQ8BNiEZWkAnEOw== - dependencies: - bs58 "^5.0.0" - "@mysten/bcs@0.8.0": version "0.8.0" resolved "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.8.0.tgz#5eb96e8329be460f32808fd0d2bc4c1da55c52f6" @@ -3469,22 +3450,6 @@ dependencies: bs58 "^5.0.0" -"@mysten/sui.js@0.41.2": - version "0.41.2" - resolved "https://registry.yarnpkg.com/@mysten/sui.js/-/sui.js-0.41.2.tgz#0ef09ce8777f254c1a25f4108fb55c4755a60943" - integrity sha512-00Kkk4don9H9iRWBqXfRC4wUPY0hqAvmzxhwaYZIHj9Tmb71Nx51zLLFsxeA7dlR6cJFaXFMbZkt6WR2vP8WLQ== - dependencies: - "@mysten/bcs" "0.7.4" - "@noble/curves" "^1.1.0" - "@noble/hashes" "^1.3.1" - "@open-rpc/client-js" "^1.8.1" - "@scure/bip32" "^1.3.1" - "@scure/bip39" "^1.2.1" - "@suchipi/femver" "^1.0.0" - events "^3.3.0" - superstruct "^1.0.3" - tweetnacl "^1.0.3" - "@mysten/sui.js@0.43.3": version "0.43.3" resolved "https://registry.npmjs.org/@mysten/sui.js/-/sui.js-0.43.3.tgz#c59e971519967f07c57cb47069ec68c36f9a496d" @@ -3528,14 +3493,6 @@ "@mysten/sui.js" "0.43.3" "@wallet-standard/core" "1.0.3" -"@mysten/wallet-standard@^0.7.2": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@mysten/wallet-standard/-/wallet-standard-0.7.2.tgz#8e2019214f59e69a897a0b30cef4dea30be091fb" - integrity sha512-uePMPtQcSRX+ZQ44DO4U65QxFXVa9tB/cPnEGqe+YOn76hzR2Al4wQQciex/Y1EZK7GYATAzrFLzNSIJYE7QSA== - dependencies: - "@mysten/sui.js" "0.41.2" - "@wallet-standard/core" "1.0.3" - "@next/env@13.5.6": version "13.5.6" resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.6.tgz#c1148e2e1aa166614f05161ee8f77ded467062bc" @@ -3600,14 +3557,7 @@ dependencies: eslint-scope "5.1.1" -"@noble/curves@1.1.0", "@noble/curves@~1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" - integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== - dependencies: - "@noble/hashes" "1.3.1" - -"@noble/curves@1.2.0", "@noble/curves@^1.1.0", "@noble/curves@~1.2.0": +"@noble/curves@^1.1.0", "@noble/curves@~1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== @@ -3629,11 +3579,6 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.5.tgz#1a0377f3b9020efe2fae03290bd2a12140c95c11" integrity sha512-LTMZiiLc+V4v1Yi16TD6aX2gmtKszNye0pQgbaLqkvhIqP7nVsSaJsWloGQjJfJ8offaoP5GtX3yY5swbcJxxQ== -"@noble/hashes@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" - integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== - "@noble/hashes@1.3.2", "@noble/hashes@^1.3.1", "@noble/hashes@~1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" @@ -3644,11 +3589,6 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== -"@noble/hashes@^1.3.0", "@noble/hashes@~1.3.1": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" - integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== - "@noble/hashes@~1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" @@ -3701,152 +3641,6 @@ mkdirp "^1.0.4" rimraf "^3.0.2" -"@onekeyfe/cross-inpage-provider-core@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-core/-/cross-inpage-provider-core-1.1.51.tgz#2b84866c8e375f0d86436809ae9de5ea201dc01e" - integrity sha512-g/FAAFFcq8T+paMHufY1cp4Ewlx7FXCLXUXgeL0yjiuKC840TwvA6KIVakZmEpfYpaAQGX7B3UmWE4vo7DTpVg== - dependencies: - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-events" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - events "^3.3.0" - lodash "^4.17.21" - ms "^2.1.3" - -"@onekeyfe/cross-inpage-provider-errors@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-errors/-/cross-inpage-provider-errors-1.1.51.tgz#19a7506253f146659b34fc73170162bc1a33698e" - integrity sha512-qJlF/xOzLaKantP4jFo03iK7FRH8SXORVcB1f45GvxVVzYpg9pwSDYZlQ+R1aIQJyzMXXyf1Afpvv7y3Akf4ZA== - dependencies: - fast-safe-stringify "^2.1.1" - -"@onekeyfe/cross-inpage-provider-events@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-events/-/cross-inpage-provider-events-1.1.51.tgz#7b1d16f09f2121bcc20a7066ea4a1bec128949c2" - integrity sha512-lcR6zooH54+xL9Ytse1pVfn/4mzYXKAZjMZ6R5f1ICmlLirgebuCGSBZ/ETX2IxhP96nBYIn5stXrc3EHvmx4w== - -"@onekeyfe/cross-inpage-provider-types@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/cross-inpage-provider-types/-/cross-inpage-provider-types-1.1.51.tgz#d1aa03e39793b09baae4a866b8e40d77880911ef" - integrity sha512-RUwdf+kJEnyOZrydmYsFwMu2tE/SPEOJGEw0cB+DKC5j+ol4LPFoylyYfKGEmr+xAxPSYhF/HqV2k/ifopXWrw== - -"@onekeyfe/extension-bridge-injected@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/extension-bridge-injected/-/extension-bridge-injected-1.1.51.tgz#046742cf1d4b9d86d964c4949b105ddc14877c66" - integrity sha512-axEyNXucy3Zmif2NsK4d15ZKWKMhGeNFrRIfh3bm2KXt1NtFRIpkfSN8idgO1yloXTXt/MyUpPKdT0eZHQZFhQ== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - -"@onekeyfe/onekey-aptos-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-aptos-provider/-/onekey-aptos-provider-1.1.51.tgz#c89ec350c9bbc9e187a704ea4f36fc42c05aa351" - integrity sha512-Rli1mj9qfVv4WVNM3EZ+W+EglFEJQ0qNs9Ed+NJvV4iGu/7Mp2cCUxQesFd5BqAgGKtgTcs9JQQdrbLV4sOn2Q== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - aptos "^1.3.17" - eth-rpc-errors "^4.0.3" - -"@onekeyfe/onekey-cardano-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-cardano-provider/-/onekey-cardano-provider-1.1.51.tgz#1a265de03fcaab5dac7704c77020d212822d3b4c" - integrity sha512-7En5teN8fIc9V0PyUvot8mByYVNDnVTYh6bNtDDyzYzKlUcygT/m4fRMmKx7lSbCLVnGNCGZhcqZH4wzcsC1sw== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - -"@onekeyfe/onekey-conflux-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-conflux-provider/-/onekey-conflux-provider-1.1.51.tgz#b7f029197cedc557ec9a778d7b1b87fa9932c002" - integrity sha512-BB6KdjXV6ZHlxa1V/WEIUUwMWyaonyfPU+UJFzQPwE0jEJXbeUmBVzHv7q3+WF2mZhg1PRSXda4Cr2LTSnDWfQ== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - -"@onekeyfe/onekey-cosmos-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-cosmos-provider/-/onekey-cosmos-provider-1.1.51.tgz#3a6cfc3f982e548a6b0d636f516c7094094e0e05" - integrity sha512-WVHSI7aTa8pQnfEUdgWOyv57t7qjGWuHEDCq4BTsRwmuoz68ibockC+gEuO573JQRzka/pbxhz/ICV9FWlXtrw== - dependencies: - "@noble/hashes" "^1.3.0" - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - eth-rpc-errors "^4.0.3" - long "^5.2.1" - mitt "^3.0.0" - -"@onekeyfe/onekey-near-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-near-provider/-/onekey-near-provider-1.1.51.tgz#083fc4f21565717198d831e2299f0ffb64f48ef6" - integrity sha512-yKQvYf76uliybU7yLyqRRAdVdwI9Qd04qqs7xYLXe6EfQX/sdPYK7u4t3cHSZfDdql6MwNVuisIFdE+nvsY4GQ== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - borsh "^0.6.0" - depd "^2.0.0" - tweetnacl "^1.0.3" - -"@onekeyfe/onekey-solana-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-solana-provider/-/onekey-solana-provider-1.1.51.tgz#93126bfea271900513919760d0fd592d62cc88c8" - integrity sha512-QpHL0Ym5EGSpwmxrJGSr2Hm33K3D9OuvEApkvJpPt4ZvmbEaTvSz492toYZWTHLDEKmKN35yKRVOJp9t7CZRYw== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - "@solana/wallet-standard-features" "^1.1.0" - "@solana/web3.js" "^1.41.3" - "@wallet-standard/base" "^1.0.1" - bs58 "^5.0.0" - -"@onekeyfe/onekey-sui-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-sui-provider/-/onekey-sui-provider-1.1.51.tgz#277a52f62dd21af2b763cea05c47935675f5d751" - integrity sha512-lLRM/pS36XdmnKdd2lVH6GkWguS0W3W9+AfC8Z05ixs++8FULHq1SMKlgMqt4KZMrMLaL7wRGmH2erBT8xQ3/A== - dependencies: - "@mysten/wallet-standard" "^0.7.2" - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - eth-rpc-errors "^4.0.3" - mitt "^3.0.0" - -"@onekeyfe/onekey-tron-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-tron-provider/-/onekey-tron-provider-1.1.51.tgz#fff936d7fca5b1f824c86a3fb33c3b12975c8413" - integrity sha512-bMJeU38x5XhGmi6DYBVFuAH+IcSFZwXQZEbd/Styq43R1kKDuFOPhbYq/iCfZAxwnhxJbLjq3+xpUU+Q/y1s1g== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - querystring "^0.2.1" - sunweb "^1.0.7" - tronweb "^5.1.0" - -"@onekeyfe/onekey-webln-provider@1.1.51": - version "1.1.51" - resolved "https://registry.yarnpkg.com/@onekeyfe/onekey-webln-provider/-/onekey-webln-provider-1.1.51.tgz#9a27adcfa7aa1f32dacb1fa3b09de84b2f66839b" - integrity sha512-VdJuATVEmq2vg5ne/d2xGUrvxEvAPN4eMeIbI7d5h2iCrAgkSyIoKRHs+TBYWcsOWiTaABRpwHfOjhwYToiFdw== - dependencies: - "@onekeyfe/cross-inpage-provider-core" "1.1.51" - "@onekeyfe/cross-inpage-provider-errors" "1.1.51" - "@onekeyfe/cross-inpage-provider-types" "1.1.51" - "@onekeyfe/extension-bridge-injected" "1.1.51" - "@open-rpc/client-js@^1.8.1": version "1.8.1" resolved "https://registry.yarnpkg.com/@open-rpc/client-js/-/client-js-1.8.1.tgz#73b5a5bf237f24b14c3c89205b1fca3aea213213" @@ -5051,15 +4845,6 @@ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f" integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q== -"@scure/bip32@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.1.tgz#7248aea723667f98160f593d621c47e208ccbb10" - integrity sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A== - dependencies: - "@noble/curves" "~1.1.0" - "@noble/hashes" "~1.3.1" - "@scure/base" "~1.1.0" - "@scure/bip32@^1.3.1": version "1.3.2" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.2.tgz#90e78c027d5e30f0b22c1f8d50ff12f3fb7559f8" @@ -5077,7 +4862,7 @@ "@noble/hashes" "~1.1.1" "@scure/base" "~1.1.0" -"@scure/bip39@1.2.1", "@scure/bip39@^1.2.1": +"@scure/bip39@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== @@ -5111,14 +4896,6 @@ dependencies: buffer "~6.0.3" -"@solana/wallet-standard-features@^1.1.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@solana/wallet-standard-features/-/wallet-standard-features-1.2.0.tgz#be8b3824abf5ebcfeaa7298445bf53f76a27c935" - integrity sha512-tUd9srDLkRpe1BYg7we+c4UhRQkq+XQWswsr/L1xfGmoRDF47BPSXf4zE7ZU2GRBGvxtGt7lwJVAufQyQYhxTQ== - dependencies: - "@wallet-standard/base" "^1.0.1" - "@wallet-standard/features" "^1.0.3" - "@solana/web3.js@^1.41.3": version "1.63.1" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.63.1.tgz#88a19a17f5f4aada73ad70a94044c1067cab2b4d" @@ -5339,11 +5116,6 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== -"@tronweb3/google-protobuf@^3.21.2": - version "3.21.2" - resolved "https://registry.yarnpkg.com/@tronweb3/google-protobuf/-/google-protobuf-3.21.2.tgz#0964cf83ed7826d31c3cb4e4ecf07655681631c9" - integrity sha512-IVcT2GfWX3K6tHUVhs14NP5uzKhQt4KeDya1g9ACxuZsUzsaoGUIGzceK2Ltu7xp1YV94AaHOf4yxLAivlvEkQ== - "@trysound/sax@0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" @@ -5578,11 +5350,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.18.tgz#3b4fed5cfb58010e3a2be4b6e74615e4847f1074" integrity sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA== -"@types/node@18.15.13": - version "18.15.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" - integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== - "@types/node@^12.12.54": version "12.20.55" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" @@ -6517,11 +6284,6 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -aes-js@4.0.0-beta.5: - version "4.0.0-beta.5" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" - integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== - aes-js@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" @@ -7066,13 +6828,6 @@ axios@0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" - integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== - dependencies: - follow-redirects "^1.14.8" - axobject-query@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" @@ -7323,14 +7078,6 @@ babel-preset-react-app@^10.0.1: babel-plugin-macros "^3.1.0" babel-plugin-transform-react-remove-prop-types "^0.4.24" -babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g== - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -8489,11 +8236,6 @@ core-js-pure@^3.25.1: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.25.3.tgz#66ac5bfa5754b47fdfd14f3841c5ed21c46db608" integrity sha512-T/7qvgv70MEvRkZ8p6BasLZmOVYKzOaWNBEHAU8FmveCJkl4nko2quqPQOmy6AJIp5MBanhz9no3A94NoRb0XA== -core-js@^2.4.0: - version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - core-js@^3.19.2: version "3.30.2" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.30.2.tgz#6528abfda65e5ad728143ea23f7a14f0dcf503fc" @@ -8567,6 +8309,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + cross-fetch@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" @@ -8574,7 +8323,7 @@ cross-fetch@^3.1.5: dependencies: node-fetch "2.6.7" -cross-spawn@7.0.3, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@7.0.3, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -10296,13 +10045,6 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== -eth-rpc-errors@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz#6ddb6190a4bf360afda82790bb7d9d5e724f423a" - integrity sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg== - dependencies: - fast-safe-stringify "^2.0.6" - eth-sig-util@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.1.tgz#8753297c83a3f58346bd13547b59c4b2cd110c96" @@ -10334,16 +10076,6 @@ ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" -ethereum-cryptography@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz#18fa7108622e56481157a5cb7c01c0c6a672eb67" - integrity sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug== - dependencies: - "@noble/curves" "1.1.0" - "@noble/hashes" "1.3.1" - "@scure/bip32" "1.3.1" - "@scure/bip39" "1.2.1" - ethereumjs-abi@^0.6.8: version "0.6.8" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" @@ -10436,19 +10168,6 @@ ethers@^5.6.5: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -ethers@^6.6.0: - version "6.9.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.9.2.tgz#6f4632f62e2350fa8354ff28624027a175ef85a4" - integrity sha512-YpkrtILnMQz5jSEsJQRTpduaGT/CXuLnUIuOYzHA0v/7c8IX91m2J48wSKjzGL5L9J/Us3tLoUdb+OwE3U+FFQ== - dependencies: - "@adraffy/ens-normalize" "1.10.0" - "@noble/curves" "1.2.0" - "@noble/hashes" "1.3.2" - "@types/node" "18.15.13" - aes-js "4.0.0-beta.5" - tslib "2.4.0" - ws "8.5.0" - ethjs-util@0.1.6, ethjs-util@^0.1.3: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" @@ -10457,11 +10176,6 @@ ethjs-util@0.1.6, ethjs-util@^0.1.3: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" -eventemitter3@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - eventemitter3@^4.0.0, eventemitter3@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -10686,7 +10400,7 @@ fast-loops@^1.1.3: resolved "https://registry.yarnpkg.com/fast-loops/-/fast-loops-1.1.3.tgz#ce96adb86d07e7bf9b4822ab9c6fac9964981f75" integrity sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g== -fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.0.7, fast-safe-stringify@^2.1.1: +fast-safe-stringify@^2.0.7: version "2.1.1" resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== @@ -10917,11 +10631,6 @@ follow-redirects@^1.0.0, follow-redirects@^1.14.9: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== -follow-redirects@^1.14.8: - version "1.15.4" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" - integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -11977,11 +11686,6 @@ ini@^1.3.5, ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -injectpromise@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/injectpromise/-/injectpromise-1.0.0.tgz#c621f7df2bbfc1164d714f1fb229adec2079da39" - integrity sha512-qNq5wy4qX4uWHcVFOEU+RqZkoVG65FhvGkyDWbuBxILMjK6A1LFf5A1mgXZkD4nRx5FCorD81X/XvPKp/zVfPA== - inline-style-prefixer@^6.0.1: version "6.0.4" resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-6.0.4.tgz#4290ed453ab0e4441583284ad86e41ad88384f44" @@ -13706,11 +13410,6 @@ loglevel@^1.6.8: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.1.tgz#5c621f83d5b48c54ae93b6156353f555963377b4" integrity sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg== -long@^5.2.1: - version "5.2.3" - resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" - integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== - loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -14083,11 +13782,6 @@ mississippi@^3.0.0: stream-each "^1.1.0" through2 "^2.0.0" -mitt@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" - integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== - mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -14135,7 +13829,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1, ms@^2.1.3: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -16335,16 +16029,11 @@ query-string@6.13.5: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" -querystring-es3@^0.2.0, querystring-es3@^0.2.1: +querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== -querystring@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" - integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== - querystringify@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" @@ -16766,11 +16455,6 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - regenerator-runtime@^0.13.10: version "0.13.10" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee" @@ -18181,15 +17865,6 @@ sudo-prompt@9.1.1: resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.1.1.tgz#73853d729770392caec029e2470db9c221754db0" integrity sha512-es33J1g2HjMpyAhz8lOR+ICmXXAqTuKbuXuUWLhOLew20oN9oUCgCJx615U/v7aioZg7IX5lIh9x34vwneu4pA== -sunweb@^1.0.7: - version "1.1.0" - resolved "https://registry.yarnpkg.com/sunweb/-/sunweb-1.1.0.tgz#7d00dbd610f9fd7d3380f71ae1fa03dabd882094" - integrity sha512-RoQHMAE3EMM04/y9XHDOhmnf4prhes2yYsRMi5mYANSHohpPvLl+v5I7xD0M5f5W6dMz2eSY7b0NsIyfH/1V/g== - dependencies: - "@babel/runtime" "^7.4.5" - babel-runtime "^6.26.0" - injectpromise "^1.0.0" - superagent@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/superagent/-/superagent-6.1.0.tgz#09f08807bc41108ef164cfb4be293cebd480f4a6" @@ -18627,25 +18302,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -tronweb@^5.1.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/tronweb/-/tronweb-5.3.1.tgz#eb97e667f580b2c7de81311dd1b353f4b5d927a9" - integrity sha512-JF3HE0ab8KQWJWETCF7UqZHD4uMNNGlEPrquBoObu5bWc8A8eerBV9M2PJq+HcSYBivmEHeBqFgmpMAQP3ofpw== - dependencies: - "@babel/runtime" "^7.0.0" - "@ethersproject/abi" "^5.7.0" - "@tronweb3/google-protobuf" "^3.21.2" - axios "^0.26.1" - bignumber.js "^9.0.1" - ethereum-cryptography "^2.0.0" - ethers "^6.6.0" - eventemitter3 "^3.1.0" - injectpromise "^1.0.0" - lodash "^4.17.21" - querystring-es3 "^0.2.1" - semver "^5.6.0" - validator "^13.7.0" - tryer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" @@ -19157,11 +18813,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -validator@^13.7.0: - version "13.11.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-13.11.0.tgz#23ab3fd59290c61248364eabf4067f04955fbb1b" - integrity sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ== - vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -19871,11 +19522,6 @@ ws@7.5.3: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - ws@^6.2.1: version "6.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" diff --git a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts new file mode 100644 index 00000000..04f70e68 --- /dev/null +++ b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts @@ -0,0 +1,169 @@ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +import { styleContent } from './style' + +enum EHostSecurityLevel { + High = 'high', + Medium = 'medium', + Security = 'security', + Unknown = 'unknown', +} +interface IAttackType { + name: string; + description: string; +} + +interface IHostSecurity { + host: string; + level: EHostSecurityLevel; + attackTypes: IAttackType[]; + phishingSite: boolean; + alert: string; +} + +interface IWalletRiskInfo { + securityInfo: IHostSecurity; + isExtension: boolean | undefined; + i18n: { + title: string; + listTitle: string; + listContent: string[]; + continueMessage: string; + continueLink: string; + closeButton: string; + sourceMessage: string; + }; +} + +const wait = (ms: number) => + new Promise((resolve) => { + setTimeout(resolve, ms); + }); + +class ShadowModal { + hostElement: HTMLElement | null; + shadowRoot: ShadowRoot | null | undefined; + riskInfo: IWalletRiskInfo | undefined; + + constructor(hostElementId: string, riskInfo: IWalletRiskInfo) { + this.hostElement = document.getElementById(hostElementId); + if (!this.hostElement) { + console.error(`Element with ID '${hostElementId}' not found.`); + return; + } + + this.shadowRoot = this.hostElement.attachShadow({ mode: 'open' }); + this.riskInfo = riskInfo + this.render(); + } + + render() { + const { + title = 'Malicious Dapp', + listTitle = 'Potential risks:', + listContent = [ + 'Theft of recovery phrase or password', + 'Phishing attacks', + 'Fake tokens or scams', + ], + continueMessage = 'If you understand the risks and want to proceed, you can', + continueLink = 'continue to the site', + closeButton: btnText = 'Close Tab', + sourceMessage = 'Connection blocked by', + } = this.riskInfo?.i18n ?? {} + // 创建样式 + const style = document.createElement('style'); + style.textContent = styleContent; + + // 创建浮层 div + const overlay = document.createElement('div'); + overlay.className = 'onekey-inject-overlay'; + + // 创建 Modal div + const modalContainer = document.createElement('div'); + modalContainer.className = 'onekey-inject-modal-container'; + + const modal = document.createElement('div'); + modal.className = 'onekey-inject-modal'; + + // 创建风险提示内容 + const riskWarning = document.createElement('div'); + riskWarning.className = 'onekey-inject-risk-warning'; + riskWarning.innerHTML = `
+
+
+
+ ${title} +
+

${listTitle}

+
    + ${listContent.map((item) => `
  • ${item}
  • `).join('')} +
+

${continueMessage}${' '}${continueLink}.

+ `; + + const closeButton = document.createElement('button'); + closeButton.className = 'onekey-inject-close-btn onekey-inject-font onekey-inject-bodyLg-medium'; + closeButton.textContent = btnText; + closeButton.onclick = () => this.closeTab(); + + const footer = document.createElement('div'); + footer.className = 'onekey-inject-footer onekey-inject-font onekey-inject-bodyLg'; + footer.innerHTML = `${sourceMessage} + ` + + + // 组装 + modal.appendChild(riskWarning); + if (!this.riskInfo?.isExtension) { + modal.appendChild(closeButton); + } + modalContainer.appendChild(modal); + modalContainer.appendChild(footer); + overlay.appendChild(modalContainer); + this.shadowRoot?.appendChild(style); + this.shadowRoot?.appendChild(overlay); + + const continueButton = this.shadowRoot?.getElementById('onekey-inject-continue') + if (continueButton) { + console.log('continueButton --> onclick', continueButton) + continueButton.addEventListener('click', () => this.closeOverlay()); + } + } + + closeOverlay() { + this.hostElement?.remove(); + } + closeTab() { + void window.$onekey.$private.request({ + method: 'wallet_closeCurrentBrowserTab', + }) + } +} + + +function injectRiskErrorScreen(riskInfo: IWalletRiskInfo) { + console.log('=====>>>>: Detect Risk website version 5') + const injectDiv = document.createElement('div'); + injectDiv.id = 'onekey-inject'; + document.body.appendChild(injectDiv) + new ShadowModal('onekey-inject', riskInfo); +} + +async function detectWebsiteRiskLevel() { + // wait nexttick + await wait(300); + const riskResult = await window.$onekey.$private.request({ + method: 'wallet_detectRiskLevel', + }) as IWalletRiskInfo; + if (riskResult.securityInfo.level === 'high') { + injectRiskErrorScreen(riskResult) + } else { + injectRiskErrorScreen(riskResult) + } +} + +void detectWebsiteRiskLevel() diff --git a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts new file mode 100644 index 00000000..e97379b2 --- /dev/null +++ b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts @@ -0,0 +1,217 @@ +export const styleContent = ` +.onekey-inject-font { + font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji; + font-style: normal; + letter-spacing: -0.32px; + color: rgba(0, 0, 0, 0.88); +} +.onekey-inject-headingXl { + /* headingXl */ + font-size: 20px; + font-weight: 600; + line-height: 28px; /* 140% */ + letter-spacing: 0.38px; +} +.onekey-inject-bodyLg { + /* bodyLg */ + font-size: 16px; + font-weight: 400; + line-height: 24px; /* 150% */ +} +.onekey-inject-bodyLg-medium { + /* bodyLg-medium */ + font-size: 16px; + font-weight: 500; + line-height: 24px; /* 150% */ + color: rgba(255, 255, 255, 0.93); +} +.onekey-inject-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(219, 0, 7, 0.72); + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + z-index: 100000; +} +.onekey-inject-modal-container { + display: flex; + max-width: 384px; + flex-direction: column; + align-items: flex-start; + border-radius: 24px; + border: 3px solid rgba(217, 0, 3, 0.32); + background: #FFF; + box-shadow: 0px 12px 24px 0px rgba(0, 0, 0, 0.09); +} +.onekey-inject-modal { + display: flex; + max-width: 384px; + flex-direction: column; + align-items: flex-start; + border-radius: 24px; + background: #FFF; + padding: 20px 20px 0 16px; +} +.onekey-inject-error-icon { + display: flex; + justify-content: center; + align-items: center; + width: 56px; + height: 56px; + padding: 12px; + margin-right: 12px; + border-radius: 9999px; + background: rgba(255, 5, 5, 0.03); + box-sizing: border-box; +} +.onekey-inject-error-icon-content { + background-image: url('data:image/svg+xml;utf8,'); + width: 32px; /* SVG width */ + height: 33px; /* SVG height */ + display: block; +} +.onekey-inject-error-icon > img { + width: 32px; + height: 32px; + border-radius: 9999px; +} +.onekey-inject-title { + display: flex; + align-items: center; +} +.onekey-inject-risk-warning { + margin-bottom: 20px; +} +.onekey-inject-text-wrap { + margin: 0; + margin-top: 20px; +} +.onekey-inject-text-subdued { + margin: 0; + color: rgba(0, 0, 0, 0.61); +} +.onekey-inject-list { + padding-left: 20px; + margin: 8px 0; +} +.onekey-inject-continue-link { + text-decoration: underline; + cursor: pointer; +} +.onekey-inject-continue-link:hover { + color: rgba(0, 0, 0, 0.7); +} +.onekey-inject-continue-link:active { + color: rgba(0, 0, 0, 0.5); +} +.onekey-inject-close-btn { + display: flex; + height: 38px; + padding: 6px 14px; + margin-bottom: 20px; + justify-content: center; + align-items: center; + gap: 8px; + align-self: stretch; + border-radius: 8px; + border: 1px solid rgba(170, 170, 170, 0); + background: rgba(0, 0, 0, 0.88); + color: rgba(255, 255, 255, 0.93); + text-align: center; + cursor: pointer; +} +.onekey-inject-close-btn:hover { + background: rgba(0, 0, 0, 0.7); +} +.onekey-inject-close-btn:active { + background: rgba(0, 0, 0, 0.5); +} +.onekey-inject-footer { + display: flex; + padding:16px 20px; + flex-direction: row; + justify-content: center; + align-items: center; + gap: 8px; + align-self: stretch; + height: 56px; + background: #F9F9F9; + border-radius: 0 0 24px 24px; + box-sizing: border-box; + color: rgba(0, 0, 0, 0.61); +} +.onekey-inject-logo { + display: flex; + flex-direction: row; + align-items: center; + color: rgba(0, 0, 0, 0.88); + font-weight: 600; +} +.onekey-inject-logo-content { + width: 20px; + height: 20px; + margin-right: 6px; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M10.4987 14.4595C11.3758 14.4595 12.0867 13.7485 12.0867 12.8715C12.0867 11.9945 11.3758 11.2836 10.4987 11.2836C9.62174 11.2836 8.91078 11.9945 8.91078 12.8715C8.91078 13.7485 9.62174 14.4595 10.4987 14.4595Z' fill='black' fill-opacity='0.875'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.4987 19.6668C16.827 19.6668 19.6654 16.8284 19.6654 10.5002C19.6654 4.1719 16.827 1.3335 10.4987 1.3335C4.17044 1.3335 1.33203 4.1719 1.33203 10.5002C1.33203 16.8284 4.17044 19.6668 10.4987 19.6668ZM8.77681 5.22049H11.3269V9.42284H9.74582V6.57329H8.32942L8.77681 5.22049ZM10.4988 15.7798C12.105 15.7798 13.407 14.4778 13.407 12.8715C13.407 11.2653 12.105 9.96325 10.4988 9.96325C8.89255 9.96325 7.59046 11.2653 7.59046 12.8715C7.59046 14.4778 8.89255 15.7798 10.4988 15.7798Z' fill='black' fill-opacity='0.875'/%3E%3C/svg%3E"); +} + +/* Dark Mode */ +@media (prefers-color-scheme: dark) { + .onekey-inject-font { + color: rgba(255, 255, 255, 0.93); + } + .onekey-inject-bodyLg-medium { + color: rgba(0, 0, 0, 0.88); + } + .onekey-inject-bodyLg { + color: rgba(255, 255, 255, 0.93); + } + .onekey-inject-modal-container { + background: #1B1B1B; + } + .onekey-inject-modal { + background: #1B1B1B; + } + .onekey-inject-footer { + background: #1B1B1B; + } + .onekey-inject-error-icon { + background: rgba(254, 0, 25, 0.07); + } + .onekey-inject-text-subdued { + color: rgba(255, 255, 255, 0.66); + } + .onekey-inject-close-btn { + border: 1px solid rgba(170, 170, 170, 0.00); + background: rgba(255, 255, 255, 0.93); + } + .onekey-inject-close-btn:hover { + background: rgba(255, 255, 255, 0.7); + } + .onekey-inject-close-btn:active { + background: rgba(255, 255, 255, 0.5); + } + .onekey-inject-continue-link:hover { + color: rgba(255, 255, 255, 0.7); + } + .onekey-inject-continue-link:active { + color: rgba(255, 255, 255, 0.5); + } + .onekey-inject-footer { + color: rgba(255, 255, 255, 0.66); + } + .onekey-inject-logo { + color: rgba(255, 255, 255, 0.93); + } + .onekey-inject-error-icon-content { + background-image: url('data:image/svg+xml;utf8,'); + } + .onekey-inject-logo-content { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M10.4987 14.4595C11.3758 14.4595 12.0867 13.7485 12.0867 12.8715C12.0867 11.9945 11.3758 11.2836 10.4987 11.2836C9.62174 11.2836 8.91078 11.9945 8.91078 12.8715C8.91078 13.7485 9.62174 14.4595 10.4987 14.4595Z' fill='white' fill-opacity='0.926'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.4987 19.6668C16.827 19.6668 19.6654 16.8284 19.6654 10.5002C19.6654 4.1719 16.827 1.3335 10.4987 1.3335C4.17044 1.3335 1.33203 4.1719 1.33203 10.5002C1.33203 16.8284 4.17044 19.6668 10.4987 19.6668ZM8.77681 5.22049H11.3269V9.42284H9.74582V6.57329H8.32942L8.77681 5.22049ZM10.4988 15.7798C12.105 15.7798 13.407 14.4778 13.407 12.8715C13.407 11.2653 12.105 9.96325 10.4988 9.96325C8.89255 9.96325 7.59046 11.2653 7.59046 12.8715C7.59046 14.4778 8.89255 15.7798 10.4988 15.7798Z' fill='white' fill-opacity='0.926'/%3E%3C/svg%3E"); + } +} +` diff --git a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts index 907105aa..05b5bc66 100644 --- a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts +++ b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts @@ -20,6 +20,7 @@ import { ProviderWebln } from '@onekeyfe/onekey-webln-provider'; import { ProviderNostr } from '@onekeyfe/onekey-nostr-provider'; import { ProviderBtc } from '@onekeyfe/onekey-btc-provider'; import './connectButtonHack'; +import './detectRiskWebsite'; import { WALLET_CONNECT_INFO } from './connectButtonHack/consts'; // import Web3 from 'web3'; // cause build error From f20fdcdcaf154c407fc413b7f73dbb3f829d43c5 Mon Sep 17 00:00:00 2001 From: Leon Date: Wed, 13 Mar 2024 15:27:01 +0800 Subject: [PATCH 4/8] chore: new alpha version --- packages/core/package.json | 8 ++--- .../desktop-bridge-injected/package.json | 6 ++-- packages/empty/package.json | 2 +- packages/errors/package.json | 2 +- packages/events/package.json | 2 +- packages/example/package.json | 24 ++++++------- .../extension-bridge-hosted/package.json | 6 ++-- .../extension-bridge-injected/package.json | 6 ++-- packages/injected/package.json | 14 ++++---- .../native-bridge-injected/package.json | 6 ++-- .../inpage-providers-hub/package.json | 34 +++++++++---------- .../onekey-aptos-provider/package.json | 10 +++--- .../onekey-btc-provider/package.json | 10 +++--- .../onekey-cardano-provider/package.json | 10 +++--- .../onekey-conflux-provider/package.json | 10 +++--- .../onekey-cosmos-provider/package.json | 10 +++--- .../onekey-eth-provider/package.json | 10 +++--- .../onekey-near-provider/package.json | 10 +++--- .../onekey-nostr-provider/package.json | 10 +++--- .../onekey-polkadot-provider/package.json | 10 +++--- .../onekey-private-provider/package.json | 10 +++--- .../onekey-solana-provider/package.json | 10 +++--- .../onekey-starcoin-provider/package.json | 10 +++--- .../onekey-sui-provider/package.json | 10 +++--- .../onekey-tron-provider/package.json | 10 +++--- .../onekey-webln-provider/package.json | 10 +++--- packages/types/package.json | 2 +- packages/webview/package.json | 6 ++-- 28 files changed, 134 insertions(+), 134 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 13cca84d..41111378 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-core", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -29,9 +29,9 @@ "build-version-info": "node ./scripts/buildVersionInfo.js" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-events": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-events": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", "events": "^3.3.0", "lodash": "^4.17.21", "ms": "^2.1.3" diff --git a/packages/desktop/desktop-bridge-injected/package.json b/packages/desktop/desktop-bridge-injected/package.json index 9f40b432..d61c3bcf 100644 --- a/packages/desktop/desktop-bridge-injected/package.json +++ b/packages/desktop/desktop-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/desktop-bridge-injected", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -34,7 +34,7 @@ "electron": "^17.2.0" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0" } } diff --git a/packages/empty/package.json b/packages/empty/package.json index 0fa86dbd..67f8fda0 100644 --- a/packages/empty/package.json +++ b/packages/empty/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-empty", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/errors/package.json b/packages/errors/package.json index fde2bb50..57283b7a 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-errors", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/events/package.json b/packages/events/package.json index 5f4b27c6..52f66c45 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-events", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/example/package.json b/packages/example/package.json index b7d839cc..e0d9fcd6 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-example", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "private": true, "scripts": { "postinstall": "patch-package", @@ -16,17 +16,17 @@ "@ethersproject/bytes": "^5.0.6", "@metamask/onboarding": "^1.0.1", "@mysten/wallet-kit": "^0.7.2", - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/onekey-aptos-provider": "1.1.55", - "@onekeyfe/onekey-cardano-provider": "1.1.55", - "@onekeyfe/onekey-conflux-provider": "1.1.55", - "@onekeyfe/onekey-cosmos-provider": "1.1.55", - "@onekeyfe/onekey-near-provider": "1.1.55", - "@onekeyfe/onekey-solana-provider": "1.1.55", - "@onekeyfe/onekey-sui-provider": "1.1.55", - "@onekeyfe/onekey-tron-provider": "1.1.55", - "@onekeyfe/onekey-webln-provider": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/onekey-aptos-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-cardano-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-conflux-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-cosmos-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-near-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-solana-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-sui-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-tron-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-webln-provider": "1.1.56-alpha.0", "@polkadot/api": "^9.11.3", "@polkadot/extension-dapp": "^0.44.8", "@solana/web3.js": "^1.41.3", diff --git a/packages/extension/extension-bridge-hosted/package.json b/packages/extension/extension-bridge-hosted/package.json index b7425d56..9dadda29 100644 --- a/packages/extension/extension-bridge-hosted/package.json +++ b/packages/extension/extension-bridge-hosted/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/extension-bridge-hosted", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,8 +28,8 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/extension/extension-bridge-injected/package.json b/packages/extension/extension-bridge-injected/package.json index 306c2931..7c904489 100644 --- a/packages/extension/extension-bridge-injected/package.json +++ b/packages/extension/extension-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/extension-bridge-injected", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0" } } diff --git a/packages/injected/package.json b/packages/injected/package.json index f64693a3..438437af 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-injected", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -42,12 +42,12 @@ "electron": "*" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/desktop-bridge-injected": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", - "@onekeyfe/inpage-providers-hub": "1.1.55", - "@onekeyfe/native-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/desktop-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/inpage-providers-hub": "1.1.56-alpha.0", + "@onekeyfe/native-bridge-injected": "1.1.56-alpha.0", "buffer": "^6.0.3" } } diff --git a/packages/native/native-bridge-injected/package.json b/packages/native/native-bridge-injected/package.json index 66596eda..e1486ff1 100644 --- a/packages/native/native-bridge-injected/package.json +++ b/packages/native/native-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/native-bridge-injected", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0" } } diff --git a/packages/providers/inpage-providers-hub/package.json b/packages/providers/inpage-providers-hub/package.json index 2d8e6b95..fa5418a1 100644 --- a/packages/providers/inpage-providers-hub/package.json +++ b/packages/providers/inpage-providers-hub/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/inpage-providers-hub", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,22 +28,22 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/onekey-aptos-provider": "1.1.55", - "@onekeyfe/onekey-btc-provider": "1.1.55", - "@onekeyfe/onekey-cardano-provider": "1.1.55", - "@onekeyfe/onekey-conflux-provider": "1.1.55", - "@onekeyfe/onekey-cosmos-provider": "1.1.55", - "@onekeyfe/onekey-eth-provider": "1.1.55", - "@onekeyfe/onekey-nostr-provider": "1.1.55", - "@onekeyfe/onekey-polkadot-provider": "1.1.55", - "@onekeyfe/onekey-private-provider": "1.1.55", - "@onekeyfe/onekey-solana-provider": "1.1.55", - "@onekeyfe/onekey-starcoin-provider": "1.1.55", - "@onekeyfe/onekey-sui-provider": "1.1.55", - "@onekeyfe/onekey-tron-provider": "1.1.55", - "@onekeyfe/onekey-webln-provider": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/onekey-aptos-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-btc-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-cardano-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-conflux-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-cosmos-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-eth-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-nostr-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-polkadot-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-private-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-solana-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-starcoin-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-sui-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-tron-provider": "1.1.56-alpha.0", + "@onekeyfe/onekey-webln-provider": "1.1.56-alpha.0", "web3": "^1.7.3" } } diff --git a/packages/providers/onekey-aptos-provider/package.json b/packages/providers/onekey-aptos-provider/package.json index 26eeb348..b607ac1a 100644 --- a/packages/providers/onekey-aptos-provider/package.json +++ b/packages/providers/onekey-aptos-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-aptos-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "aptos": "^1.3.17", "eth-rpc-errors": "^4.0.3" } diff --git a/packages/providers/onekey-btc-provider/package.json b/packages/providers/onekey-btc-provider/package.json index 9a7e0252..eb533aed 100644 --- a/packages/providers/onekey-btc-provider/package.json +++ b/packages/providers/onekey-btc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-btc-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" } } diff --git a/packages/providers/onekey-cardano-provider/package.json b/packages/providers/onekey-cardano-provider/package.json index e0914cf2..42cee065 100644 --- a/packages/providers/onekey-cardano-provider/package.json +++ b/packages/providers/onekey-cardano-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cardano-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider", "cardano" @@ -29,9 +29,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" } } diff --git a/packages/providers/onekey-conflux-provider/package.json b/packages/providers/onekey-conflux-provider/package.json index aba037a6..f2164463 100644 --- a/packages/providers/onekey-conflux-provider/package.json +++ b/packages/providers/onekey-conflux-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-conflux-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" } } diff --git a/packages/providers/onekey-cosmos-provider/package.json b/packages/providers/onekey-cosmos-provider/package.json index a0cfca67..6533bd53 100644 --- a/packages/providers/onekey-cosmos-provider/package.json +++ b/packages/providers/onekey-cosmos-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cosmos-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "eth-rpc-errors": "^4.0.3", "long": "^5.2.1", "mitt": "^3.0.0" diff --git a/packages/providers/onekey-eth-provider/package.json b/packages/providers/onekey-eth-provider/package.json index 7ac87d8c..77a53a5d 100644 --- a/packages/providers/onekey-eth-provider/package.json +++ b/packages/providers/onekey-eth-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-eth-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "eth-rpc-errors": "^4.0.3", "uuid": "^8.3.2" }, diff --git a/packages/providers/onekey-near-provider/package.json b/packages/providers/onekey-near-provider/package.json index 74f28c73..a4c67a41 100644 --- a/packages/providers/onekey-near-provider/package.json +++ b/packages/providers/onekey-near-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-near-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -35,10 +35,10 @@ "near-api-js": "^0.44.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "borsh": "^0.6.0", "depd": "^2.0.0", "tweetnacl": "^1.0.3" diff --git a/packages/providers/onekey-nostr-provider/package.json b/packages/providers/onekey-nostr-provider/package.json index c85387d1..756445a3 100644 --- a/packages/providers/onekey-nostr-provider/package.json +++ b/packages/providers/onekey-nostr-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-nostr-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" } } diff --git a/packages/providers/onekey-polkadot-provider/package.json b/packages/providers/onekey-polkadot-provider/package.json index f521c12a..2d4e7e2a 100644 --- a/packages/providers/onekey-polkadot-provider/package.json +++ b/packages/providers/onekey-polkadot-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-polkadot-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "@polkadot/extension-inject": "^0.46.3", "eth-rpc-errors": "^4.0.3", "long": "^5.2.1", diff --git a/packages/providers/onekey-private-provider/package.json b/packages/providers/onekey-private-provider/package.json index c588287c..aa30b0cf 100644 --- a/packages/providers/onekey-private-provider/package.json +++ b/packages/providers/onekey-private-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-private-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" } } diff --git a/packages/providers/onekey-solana-provider/package.json b/packages/providers/onekey-solana-provider/package.json index 8833270b..75ebfc1e 100644 --- a/packages/providers/onekey-solana-provider/package.json +++ b/packages/providers/onekey-solana-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-solana-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider", "solona" @@ -29,10 +29,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "@solana/wallet-standard-features": "^1.1.0", "@solana/web3.js": "^1.41.3", "@wallet-standard/base": "^1.0.1", diff --git a/packages/providers/onekey-starcoin-provider/package.json b/packages/providers/onekey-starcoin-provider/package.json index 25938bda..efcef33e 100644 --- a/packages/providers/onekey-starcoin-provider/package.json +++ b/packages/providers/onekey-starcoin-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-starcoin-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "eth-rpc-errors": "^4.0.3" } } diff --git a/packages/providers/onekey-sui-provider/package.json b/packages/providers/onekey-sui-provider/package.json index 6ddf26a4..8a869a94 100644 --- a/packages/providers/onekey-sui-provider/package.json +++ b/packages/providers/onekey-sui-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-sui-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@mysten/wallet-standard": "^0.7.2", - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "eth-rpc-errors": "^4.0.3", "mitt": "^3.0.0" } diff --git a/packages/providers/onekey-tron-provider/package.json b/packages/providers/onekey-tron-provider/package.json index 09d120c8..a9cb7c32 100644 --- a/packages/providers/onekey-tron-provider/package.json +++ b/packages/providers/onekey-tron-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-tron-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", "querystring": "^0.2.1", "sunweb": "^1.0.7", "tronweb": "^5.1.0" diff --git a/packages/providers/onekey-webln-provider/package.json b/packages/providers/onekey-webln-provider/package.json index eb63565d..2d06c9cd 100644 --- a/packages/providers/onekey-webln-provider/package.json +++ b/packages/providers/onekey-webln-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-webln-provider", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-errors": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55", - "@onekeyfe/extension-bridge-injected": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" } } diff --git a/packages/types/package.json b/packages/types/package.json index b672a1f2..2874d2f6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-types", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/webview/package.json b/packages/webview/package.json index ba09be0f..99ec3ab9 100644 --- a/packages/webview/package.json +++ b/packages/webview/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cross-webview", - "version": "1.1.55", + "version": "1.1.56-alpha.0", "keywords": [ "cross-inpage-provider" ], @@ -36,7 +36,7 @@ "react-native-webview": "^11.17.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.55", - "@onekeyfe/cross-inpage-provider-types": "1.1.55" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0" } } From 1a72a8ac1e293fed1443c29c24066c138a4ad611 Mon Sep 17 00:00:00 2001 From: Leon Date: Wed, 13 Mar 2024 16:36:39 +0800 Subject: [PATCH 5/8] chore: remove test condition --- .../inpage-providers-hub/src/detectRiskWebsite/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts index 04f70e68..64c5e1dd 100644 --- a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts +++ b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts @@ -155,14 +155,12 @@ function injectRiskErrorScreen(riskInfo: IWalletRiskInfo) { async function detectWebsiteRiskLevel() { // wait nexttick - await wait(300); + await wait(500); const riskResult = await window.$onekey.$private.request({ method: 'wallet_detectRiskLevel', }) as IWalletRiskInfo; if (riskResult.securityInfo.level === 'high') { injectRiskErrorScreen(riskResult) - } else { - injectRiskErrorScreen(riskResult) } } From c0401b99e0a9271ab535f35c73a2b32feb1ee869 Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 14 Mar 2024 10:51:25 +0800 Subject: [PATCH 6/8] chore: debug --- packages/core/src/injectJsBridge.ts | 7 ++++--- packages/core/src/injectedFactory.ts | 6 +++--- packages/injected/src/injectedNative.ts | 3 +++ .../src/detectRiskWebsite/index.ts | 19 ++++++++++++++++--- .../src/detectRiskWebsite/style.ts | 1 + .../src/injectWeb3Provider.ts | 2 ++ .../src/ProviderPrivate.ts | 1 + 7 files changed, 30 insertions(+), 9 deletions(-) diff --git a/packages/core/src/injectJsBridge.ts b/packages/core/src/injectJsBridge.ts index 92592090..427680c2 100644 --- a/packages/core/src/injectJsBridge.ts +++ b/packages/core/src/injectJsBridge.ts @@ -20,12 +20,13 @@ function injectJsBridge(bridgeCreator: () => JsBridgeBase | unknown): JsBridgeBa // make cloudfare dead loop and make zhihu.com search functionally down // fixGlobalShim(); + console.log('===== jsBridge injecting... >>>>> ', performance.now()) if (!window?.$onekey?.jsBridge) { window.$onekey = window.$onekey || {}; window.$onekey.jsBridge = bridgeCreator(); - if (typeof localStorage !== 'undefined' && localStorage.getItem(DEBUG_LOGGER_STORAGE_KEY)) { - console.log('===== jsBridge injected success! >>>>> ', performance.now()); - } + console.log('===== jsBridge injected success! >>>>> ', performance.now()); + // if (typeof localStorage !== 'undefined' && localStorage.getItem(DEBUG_LOGGER_STORAGE_KEY)) { + // } } return window.$onekey.jsBridge as JsBridgeBase; diff --git a/packages/core/src/injectedFactory.ts b/packages/core/src/injectedFactory.ts index 0114164b..6ef7a8ef 100644 --- a/packages/core/src/injectedFactory.ts +++ b/packages/core/src/injectedFactory.ts @@ -8,7 +8,7 @@ function createCodeWithScriptTag({ code }: { code: string }): string { s.setAttribute('data-onekey-injected', 'true'); s.textContent=${JSON.stringify(code)}; (document.head || document.documentElement).appendChild(s); - s.remove(); + // s.remove(); })(); `; } @@ -35,12 +35,12 @@ function injectCodeWithScriptTag({ } s.onload = function () { if (remove && file) { - s.remove(); + // s.remove(); } }; (document.head || document.documentElement).appendChild(s); if (remove && code) { - s.remove(); + // s.remove(); } })(); } diff --git a/packages/injected/src/injectedNative.ts b/packages/injected/src/injectedNative.ts index 8ecc6f5a..721b761e 100644 --- a/packages/injected/src/injectedNative.ts +++ b/packages/injected/src/injectedNative.ts @@ -13,6 +13,9 @@ const bridge = () => injectJsBridge(bridge); injectWeb3Provider(); +console.log('=======>>>>>>>>>>>: inject web3Provider', ) +throw new Error('=======>>>>>>>>>>>: inject web3Provider error') +alert('====>>>>!!!') // eslint-disable-next-line no-void void 0; diff --git a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts index 64c5e1dd..01b9b3cd 100644 --- a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts +++ b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts @@ -146,21 +146,34 @@ class ShadowModal { function injectRiskErrorScreen(riskInfo: IWalletRiskInfo) { - console.log('=====>>>>: Detect Risk website version 5') const injectDiv = document.createElement('div'); injectDiv.id = 'onekey-inject'; document.body.appendChild(injectDiv) new ShadowModal('onekey-inject', riskInfo); } -async function detectWebsiteRiskLevel() { +function ensureInjectRiskErrorScreen(riskInfo: IWalletRiskInfo) { + console.log('=====>>>>: Detect Risk website version 6') + const interval = setInterval(() => { + if (document.body && document.getElementById('onekey-inject')) { + clearInterval(interval); + } else { + injectRiskErrorScreen(riskInfo); + } + }, 500); + injectRiskErrorScreen(riskInfo); +} + +export async function detectWebsiteRiskLevel() { + console.log('=====>>>>: Detect Risk website detectWebsiteRiskLevel') // wait nexttick await wait(500); const riskResult = await window.$onekey.$private.request({ method: 'wallet_detectRiskLevel', }) as IWalletRiskInfo; if (riskResult.securityInfo.level === 'high') { - injectRiskErrorScreen(riskResult) + console.log('=====>>>>: Detect Risk websit123: ', riskResult) + ensureInjectRiskErrorScreen(riskResult); } } diff --git a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts index e97379b2..fec809b4 100644 --- a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts +++ b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts @@ -31,6 +31,7 @@ export const styleContent = ` left: 0; width: 100%; height: 100%; + padding: 20px; background-color: rgba(219, 0, 7, 0.72); display: flex; justify-content: center; diff --git a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts index 05b5bc66..e88e763b 100644 --- a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts +++ b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts @@ -62,6 +62,7 @@ function injectWeb3Provider(): unknown { } const bridge: JsBridgeBase = window?.$onekey?.jsBridge; + console.log('Bridgeeeeeee'); const ethereum = new ProviderEthereum({ bridge, @@ -222,3 +223,4 @@ function injectWeb3Provider(): unknown { return $onekey; } export { injectWeb3Provider }; +console.log('injectWeb3Provider.ts: end') diff --git a/packages/providers/onekey-private-provider/src/ProviderPrivate.ts b/packages/providers/onekey-private-provider/src/ProviderPrivate.ts index d6930817..274fd335 100644 --- a/packages/providers/onekey-private-provider/src/ProviderPrivate.ts +++ b/packages/providers/onekey-private-provider/src/ProviderPrivate.ts @@ -23,6 +23,7 @@ class ProviderPrivate extends ProviderBase { void this.getConnectWalletInfo(); } catch (error) { console.error(error); + console.log('======>>>>>>>Private API') } try { void this.sendSiteMetadataDomReady(); From e2ff25b8ab718aa35b4bc891f471648ccce2d9f6 Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 14 Mar 2024 17:39:22 +0800 Subject: [PATCH 7/8] fix: remove log --- packages/core/src/injectJsBridge.ts | 7 +- packages/core/src/injectedFactory.ts | 6 +- packages/core/src/versionInfo.ts | 2 +- packages/injected/src/injectedNative.ts | 3 - .../src/detectRiskWebsite/index.ts | 113 +++++++++--------- .../src/detectRiskWebsite/style.ts | 5 +- .../src/injectWeb3Provider.ts | 2 - 7 files changed, 67 insertions(+), 71 deletions(-) diff --git a/packages/core/src/injectJsBridge.ts b/packages/core/src/injectJsBridge.ts index 427680c2..92592090 100644 --- a/packages/core/src/injectJsBridge.ts +++ b/packages/core/src/injectJsBridge.ts @@ -20,13 +20,12 @@ function injectJsBridge(bridgeCreator: () => JsBridgeBase | unknown): JsBridgeBa // make cloudfare dead loop and make zhihu.com search functionally down // fixGlobalShim(); - console.log('===== jsBridge injecting... >>>>> ', performance.now()) if (!window?.$onekey?.jsBridge) { window.$onekey = window.$onekey || {}; window.$onekey.jsBridge = bridgeCreator(); - console.log('===== jsBridge injected success! >>>>> ', performance.now()); - // if (typeof localStorage !== 'undefined' && localStorage.getItem(DEBUG_LOGGER_STORAGE_KEY)) { - // } + if (typeof localStorage !== 'undefined' && localStorage.getItem(DEBUG_LOGGER_STORAGE_KEY)) { + console.log('===== jsBridge injected success! >>>>> ', performance.now()); + } } return window.$onekey.jsBridge as JsBridgeBase; diff --git a/packages/core/src/injectedFactory.ts b/packages/core/src/injectedFactory.ts index 6ef7a8ef..0114164b 100644 --- a/packages/core/src/injectedFactory.ts +++ b/packages/core/src/injectedFactory.ts @@ -8,7 +8,7 @@ function createCodeWithScriptTag({ code }: { code: string }): string { s.setAttribute('data-onekey-injected', 'true'); s.textContent=${JSON.stringify(code)}; (document.head || document.documentElement).appendChild(s); - // s.remove(); + s.remove(); })(); `; } @@ -35,12 +35,12 @@ function injectCodeWithScriptTag({ } s.onload = function () { if (remove && file) { - // s.remove(); + s.remove(); } }; (document.head || document.documentElement).appendChild(s); if (remove && code) { - // s.remove(); + s.remove(); } })(); } diff --git a/packages/core/src/versionInfo.ts b/packages/core/src/versionInfo.ts index e53db754..f490ae4d 100644 --- a/packages/core/src/versionInfo.ts +++ b/packages/core/src/versionInfo.ts @@ -1,5 +1,5 @@ -const version = '1.1.55'; +const version = '1.1.56-alpha.0'; const versionBuild = '2020-0101-1'; export default { diff --git a/packages/injected/src/injectedNative.ts b/packages/injected/src/injectedNative.ts index 721b761e..8ecc6f5a 100644 --- a/packages/injected/src/injectedNative.ts +++ b/packages/injected/src/injectedNative.ts @@ -13,9 +13,6 @@ const bridge = () => injectJsBridge(bridge); injectWeb3Provider(); -console.log('=======>>>>>>>>>>>: inject web3Provider', ) -throw new Error('=======>>>>>>>>>>>: inject web3Provider error') -alert('====>>>>!!!') // eslint-disable-next-line no-void void 0; diff --git a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts index 01b9b3cd..acf751a5 100644 --- a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts +++ b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/index.ts @@ -1,12 +1,12 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import { styleContent } from './style' +import { styleContent } from "./style"; enum EHostSecurityLevel { - High = 'high', - Medium = 'medium', - Security = 'security', - Unknown = 'unknown', + High = "high", + Medium = "medium", + Security = "security", + Unknown = "unknown", } interface IAttackType { name: string; @@ -41,8 +41,8 @@ const wait = (ms: number) => }); class ShadowModal { - hostElement: HTMLElement | null; - shadowRoot: ShadowRoot | null | undefined; + hostElement: HTMLElement | null; + shadowRoot: ShadowRoot | null | undefined; riskInfo: IWalletRiskInfo | undefined; constructor(hostElementId: string, riskInfo: IWalletRiskInfo) { @@ -52,43 +52,43 @@ class ShadowModal { return; } - this.shadowRoot = this.hostElement.attachShadow({ mode: 'open' }); - this.riskInfo = riskInfo + this.shadowRoot = this.hostElement.attachShadow({ mode: "open" }); + this.riskInfo = riskInfo; this.render(); } render() { const { - title = 'Malicious Dapp', - listTitle = 'Potential risks:', + title = "Malicious Dapp", + listTitle = "Potential risks:", listContent = [ - 'Theft of recovery phrase or password', - 'Phishing attacks', - 'Fake tokens or scams', + "Theft of recovery phrase or password", + "Phishing attacks", + "Fake tokens or scams", ], - continueMessage = 'If you understand the risks and want to proceed, you can', - continueLink = 'continue to the site', - closeButton: btnText = 'Close Tab', - sourceMessage = 'Connection blocked by', - } = this.riskInfo?.i18n ?? {} + continueMessage = "If you understand the risks and want to proceed, you can", + continueLink = "continue to the site", + closeButton: btnText = "Close Tab", + sourceMessage = "Connection blocked by", + } = this.riskInfo?.i18n ?? {}; // 创建样式 - const style = document.createElement('style'); + const style = document.createElement("style"); style.textContent = styleContent; // 创建浮层 div - const overlay = document.createElement('div'); - overlay.className = 'onekey-inject-overlay'; + const overlay = document.createElement("div"); + overlay.className = "onekey-inject-overlay"; // 创建 Modal div - const modalContainer = document.createElement('div'); - modalContainer.className = 'onekey-inject-modal-container'; + const modalContainer = document.createElement("div"); + modalContainer.className = "onekey-inject-modal-container"; - const modal = document.createElement('div'); - modal.className = 'onekey-inject-modal'; + const modal = document.createElement("div"); + modal.className = "onekey-inject-modal"; // 创建风险提示内容 - const riskWarning = document.createElement('div'); - riskWarning.className = 'onekey-inject-risk-warning'; + const riskWarning = document.createElement("div"); + riskWarning.className = "onekey-inject-risk-warning"; riskWarning.innerHTML = `
@@ -97,24 +97,25 @@ class ShadowModal {

${listTitle}

    - ${listContent.map((item) => `
  • ${item}
  • `).join('')} + ${listContent.map((item) => `
  • ${item}
  • `).join("")}
-

${continueMessage}${' '}${continueLink}.

+

${continueMessage}${" "}${continueLink}.

`; - const closeButton = document.createElement('button'); - closeButton.className = 'onekey-inject-close-btn onekey-inject-font onekey-inject-bodyLg-medium'; + const closeButton = document.createElement("button"); + closeButton.className = + "onekey-inject-close-btn onekey-inject-font onekey-inject-bodyLg-medium"; closeButton.textContent = btnText; closeButton.onclick = () => this.closeTab(); - const footer = document.createElement('div'); - footer.className = 'onekey-inject-footer onekey-inject-font onekey-inject-bodyLg'; - footer.innerHTML = `${sourceMessage} + const footer = document.createElement("div"); + footer.className = + "onekey-inject-footer onekey-inject-font onekey-inject-bodyLg"; + footer.innerHTML = `${sourceMessage} ` - +
`; // 组装 modal.appendChild(riskWarning); @@ -127,10 +128,12 @@ class ShadowModal { this.shadowRoot?.appendChild(style); this.shadowRoot?.appendChild(overlay); - const continueButton = this.shadowRoot?.getElementById('onekey-inject-continue') + const continueButton = this.shadowRoot?.getElementById( + "onekey-inject-continue" + ); if (continueButton) { - console.log('continueButton --> onclick', continueButton) - continueButton.addEventListener('click', () => this.closeOverlay()); + console.log("continueButton --> onclick", continueButton); + continueButton.addEventListener("click", () => this.closeOverlay()); } } @@ -139,23 +142,22 @@ class ShadowModal { } closeTab() { void window.$onekey.$private.request({ - method: 'wallet_closeCurrentBrowserTab', - }) + method: "wallet_closeCurrentBrowserTab", + }); } } - function injectRiskErrorScreen(riskInfo: IWalletRiskInfo) { - const injectDiv = document.createElement('div'); - injectDiv.id = 'onekey-inject'; - document.body.appendChild(injectDiv) - new ShadowModal('onekey-inject', riskInfo); + const injectDiv = document.createElement("div"); + injectDiv.id = "onekey-inject"; + document.body.appendChild(injectDiv); + new ShadowModal("onekey-inject", riskInfo); } function ensureInjectRiskErrorScreen(riskInfo: IWalletRiskInfo) { - console.log('=====>>>>: Detect Risk website version 6') + console.log("=====>>>>: Detect Risk website version 6"); const interval = setInterval(() => { - if (document.body && document.getElementById('onekey-inject')) { + if (document.body && document.getElementById("onekey-inject")) { clearInterval(interval); } else { injectRiskErrorScreen(riskInfo); @@ -165,16 +167,15 @@ function ensureInjectRiskErrorScreen(riskInfo: IWalletRiskInfo) { } export async function detectWebsiteRiskLevel() { - console.log('=====>>>>: Detect Risk website detectWebsiteRiskLevel') + console.log("=====>>>>: Detect Risk website detectWebsiteRiskLevel"); // wait nexttick await wait(500); - const riskResult = await window.$onekey.$private.request({ - method: 'wallet_detectRiskLevel', - }) as IWalletRiskInfo; - if (riskResult.securityInfo.level === 'high') { - console.log('=====>>>>: Detect Risk websit123: ', riskResult) + const riskResult = (await window.$onekey.$private.request({ + method: "wallet_detectRiskLevel", + })) as IWalletRiskInfo; + if (riskResult.securityInfo.level === "high") { ensureInjectRiskErrorScreen(riskResult); } } -void detectWebsiteRiskLevel() +void detectWebsiteRiskLevel(); diff --git a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts index fec809b4..fe6c9bef 100644 --- a/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts +++ b/packages/providers/inpage-providers-hub/src/detectRiskWebsite/style.ts @@ -29,7 +29,7 @@ export const styleContent = ` position: fixed; top: 0; left: 0; - width: 100%; + width: 100vw; height: 100%; padding: 20px; background-color: rgba(219, 0, 7, 0.72); @@ -38,6 +38,7 @@ export const styleContent = ` align-items: center; flex-direction: column; z-index: 100000; + box-sizing: border-box; } .onekey-inject-modal-container { display: flex; @@ -215,4 +216,4 @@ export const styleContent = ` background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' viewBox='0 0 21 21' fill='none'%3E%3Cpath d='M10.4987 14.4595C11.3758 14.4595 12.0867 13.7485 12.0867 12.8715C12.0867 11.9945 11.3758 11.2836 10.4987 11.2836C9.62174 11.2836 8.91078 11.9945 8.91078 12.8715C8.91078 13.7485 9.62174 14.4595 10.4987 14.4595Z' fill='white' fill-opacity='0.926'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.4987 19.6668C16.827 19.6668 19.6654 16.8284 19.6654 10.5002C19.6654 4.1719 16.827 1.3335 10.4987 1.3335C4.17044 1.3335 1.33203 4.1719 1.33203 10.5002C1.33203 16.8284 4.17044 19.6668 10.4987 19.6668ZM8.77681 5.22049H11.3269V9.42284H9.74582V6.57329H8.32942L8.77681 5.22049ZM10.4988 15.7798C12.105 15.7798 13.407 14.4778 13.407 12.8715C13.407 11.2653 12.105 9.96325 10.4988 9.96325C8.89255 9.96325 7.59046 11.2653 7.59046 12.8715C7.59046 14.4778 8.89255 15.7798 10.4988 15.7798Z' fill='white' fill-opacity='0.926'/%3E%3C/svg%3E"); } } -` +`; diff --git a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts index e88e763b..05b5bc66 100644 --- a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts +++ b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts @@ -62,7 +62,6 @@ function injectWeb3Provider(): unknown { } const bridge: JsBridgeBase = window?.$onekey?.jsBridge; - console.log('Bridgeeeeeee'); const ethereum = new ProviderEthereum({ bridge, @@ -223,4 +222,3 @@ function injectWeb3Provider(): unknown { return $onekey; } export { injectWeb3Provider }; -console.log('injectWeb3Provider.ts: end') From 62db81c6ca67732dbe5d7f5e76e61e2541291e2a Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 14 Mar 2024 17:58:51 +0800 Subject: [PATCH 8/8] chore: version --- packages/core/package.json | 8 ++--- .../desktop-bridge-injected/package.json | 6 ++-- packages/empty/package.json | 2 +- packages/errors/package.json | 2 +- packages/events/package.json | 2 +- packages/example/package.json | 24 ++++++------- .../extension-bridge-hosted/package.json | 6 ++-- .../extension-bridge-injected/package.json | 6 ++-- packages/injected/package.json | 14 ++++---- .../native-bridge-injected/package.json | 6 ++-- .../inpage-providers-hub/package.json | 34 +++++++++---------- .../onekey-aptos-provider/package.json | 10 +++--- .../onekey-btc-provider/package.json | 10 +++--- .../onekey-cardano-provider/package.json | 10 +++--- .../onekey-conflux-provider/package.json | 10 +++--- .../onekey-cosmos-provider/package.json | 10 +++--- .../onekey-eth-provider/package.json | 10 +++--- .../onekey-near-provider/package.json | 10 +++--- .../onekey-nostr-provider/package.json | 10 +++--- .../onekey-polkadot-provider/package.json | 10 +++--- .../onekey-private-provider/package.json | 10 +++--- .../onekey-solana-provider/package.json | 10 +++--- .../onekey-starcoin-provider/package.json | 10 +++--- .../onekey-sui-provider/package.json | 10 +++--- .../onekey-tron-provider/package.json | 10 +++--- .../onekey-webln-provider/package.json | 10 +++--- packages/types/package.json | 2 +- packages/webview/package.json | 6 ++-- 28 files changed, 134 insertions(+), 134 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 41111378..1dd78731 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-core", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -29,9 +29,9 @@ "build-version-info": "node ./scripts/buildVersionInfo.js" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-events": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-events": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", "events": "^3.3.0", "lodash": "^4.17.21", "ms": "^2.1.3" diff --git a/packages/desktop/desktop-bridge-injected/package.json b/packages/desktop/desktop-bridge-injected/package.json index d61c3bcf..e6299c5b 100644 --- a/packages/desktop/desktop-bridge-injected/package.json +++ b/packages/desktop/desktop-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/desktop-bridge-injected", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -34,7 +34,7 @@ "electron": "^17.2.0" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1" } } diff --git a/packages/empty/package.json b/packages/empty/package.json index 67f8fda0..0b718992 100644 --- a/packages/empty/package.json +++ b/packages/empty/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-empty", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/errors/package.json b/packages/errors/package.json index 57283b7a..6508262d 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-errors", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/events/package.json b/packages/events/package.json index 52f66c45..9391081b 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-events", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/example/package.json b/packages/example/package.json index e0d9fcd6..f2f0b288 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-example", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "private": true, "scripts": { "postinstall": "patch-package", @@ -16,17 +16,17 @@ "@ethersproject/bytes": "^5.0.6", "@metamask/onboarding": "^1.0.1", "@mysten/wallet-kit": "^0.7.2", - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/onekey-aptos-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-cardano-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-conflux-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-cosmos-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-near-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-solana-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-sui-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-tron-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-webln-provider": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/onekey-aptos-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-cardano-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-conflux-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-cosmos-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-near-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-solana-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-sui-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-tron-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-webln-provider": "1.1.56-alpha.1", "@polkadot/api": "^9.11.3", "@polkadot/extension-dapp": "^0.44.8", "@solana/web3.js": "^1.41.3", diff --git a/packages/extension/extension-bridge-hosted/package.json b/packages/extension/extension-bridge-hosted/package.json index 9dadda29..5dde9434 100644 --- a/packages/extension/extension-bridge-hosted/package.json +++ b/packages/extension/extension-bridge-hosted/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/extension-bridge-hosted", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,8 +28,8 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/extension/extension-bridge-injected/package.json b/packages/extension/extension-bridge-injected/package.json index 7c904489..e60cf99d 100644 --- a/packages/extension/extension-bridge-injected/package.json +++ b/packages/extension/extension-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/extension-bridge-injected", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1" } } diff --git a/packages/injected/package.json b/packages/injected/package.json index 438437af..647dc161 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-injected", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -42,12 +42,12 @@ "electron": "*" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/desktop-bridge-injected": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", - "@onekeyfe/inpage-providers-hub": "1.1.56-alpha.0", - "@onekeyfe/native-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/desktop-bridge-injected": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", + "@onekeyfe/inpage-providers-hub": "1.1.56-alpha.1", + "@onekeyfe/native-bridge-injected": "1.1.56-alpha.1", "buffer": "^6.0.3" } } diff --git a/packages/native/native-bridge-injected/package.json b/packages/native/native-bridge-injected/package.json index e1486ff1..55b2e84a 100644 --- a/packages/native/native-bridge-injected/package.json +++ b/packages/native/native-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/native-bridge-injected", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1" } } diff --git a/packages/providers/inpage-providers-hub/package.json b/packages/providers/inpage-providers-hub/package.json index fa5418a1..dbd1b6d4 100644 --- a/packages/providers/inpage-providers-hub/package.json +++ b/packages/providers/inpage-providers-hub/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/inpage-providers-hub", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,22 +28,22 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/onekey-aptos-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-btc-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-cardano-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-conflux-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-cosmos-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-eth-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-nostr-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-polkadot-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-private-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-solana-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-starcoin-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-sui-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-tron-provider": "1.1.56-alpha.0", - "@onekeyfe/onekey-webln-provider": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/onekey-aptos-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-btc-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-cardano-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-conflux-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-cosmos-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-eth-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-nostr-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-polkadot-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-private-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-solana-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-starcoin-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-sui-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-tron-provider": "1.1.56-alpha.1", + "@onekeyfe/onekey-webln-provider": "1.1.56-alpha.1", "web3": "^1.7.3" } } diff --git a/packages/providers/onekey-aptos-provider/package.json b/packages/providers/onekey-aptos-provider/package.json index b607ac1a..da3c8359 100644 --- a/packages/providers/onekey-aptos-provider/package.json +++ b/packages/providers/onekey-aptos-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-aptos-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "aptos": "^1.3.17", "eth-rpc-errors": "^4.0.3" } diff --git a/packages/providers/onekey-btc-provider/package.json b/packages/providers/onekey-btc-provider/package.json index eb533aed..e0cae8e0 100644 --- a/packages/providers/onekey-btc-provider/package.json +++ b/packages/providers/onekey-btc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-btc-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1" } } diff --git a/packages/providers/onekey-cardano-provider/package.json b/packages/providers/onekey-cardano-provider/package.json index 42cee065..3aa4efc3 100644 --- a/packages/providers/onekey-cardano-provider/package.json +++ b/packages/providers/onekey-cardano-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cardano-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider", "cardano" @@ -29,9 +29,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1" } } diff --git a/packages/providers/onekey-conflux-provider/package.json b/packages/providers/onekey-conflux-provider/package.json index f2164463..18e4a748 100644 --- a/packages/providers/onekey-conflux-provider/package.json +++ b/packages/providers/onekey-conflux-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-conflux-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1" } } diff --git a/packages/providers/onekey-cosmos-provider/package.json b/packages/providers/onekey-cosmos-provider/package.json index 6533bd53..e981630a 100644 --- a/packages/providers/onekey-cosmos-provider/package.json +++ b/packages/providers/onekey-cosmos-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cosmos-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "eth-rpc-errors": "^4.0.3", "long": "^5.2.1", "mitt": "^3.0.0" diff --git a/packages/providers/onekey-eth-provider/package.json b/packages/providers/onekey-eth-provider/package.json index 77a53a5d..59b7b058 100644 --- a/packages/providers/onekey-eth-provider/package.json +++ b/packages/providers/onekey-eth-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-eth-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "eth-rpc-errors": "^4.0.3", "uuid": "^8.3.2" }, diff --git a/packages/providers/onekey-near-provider/package.json b/packages/providers/onekey-near-provider/package.json index a4c67a41..2a71882e 100644 --- a/packages/providers/onekey-near-provider/package.json +++ b/packages/providers/onekey-near-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-near-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -35,10 +35,10 @@ "near-api-js": "^0.44.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "borsh": "^0.6.0", "depd": "^2.0.0", "tweetnacl": "^1.0.3" diff --git a/packages/providers/onekey-nostr-provider/package.json b/packages/providers/onekey-nostr-provider/package.json index 756445a3..848d0c53 100644 --- a/packages/providers/onekey-nostr-provider/package.json +++ b/packages/providers/onekey-nostr-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-nostr-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1" } } diff --git a/packages/providers/onekey-polkadot-provider/package.json b/packages/providers/onekey-polkadot-provider/package.json index 2d4e7e2a..e0258b3e 100644 --- a/packages/providers/onekey-polkadot-provider/package.json +++ b/packages/providers/onekey-polkadot-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-polkadot-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "@polkadot/extension-inject": "^0.46.3", "eth-rpc-errors": "^4.0.3", "long": "^5.2.1", diff --git a/packages/providers/onekey-private-provider/package.json b/packages/providers/onekey-private-provider/package.json index aa30b0cf..7304716d 100644 --- a/packages/providers/onekey-private-provider/package.json +++ b/packages/providers/onekey-private-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-private-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1" } } diff --git a/packages/providers/onekey-solana-provider/package.json b/packages/providers/onekey-solana-provider/package.json index 75ebfc1e..13e1d234 100644 --- a/packages/providers/onekey-solana-provider/package.json +++ b/packages/providers/onekey-solana-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-solana-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider", "solona" @@ -29,10 +29,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "@solana/wallet-standard-features": "^1.1.0", "@solana/web3.js": "^1.41.3", "@wallet-standard/base": "^1.0.1", diff --git a/packages/providers/onekey-starcoin-provider/package.json b/packages/providers/onekey-starcoin-provider/package.json index efcef33e..af8f6335 100644 --- a/packages/providers/onekey-starcoin-provider/package.json +++ b/packages/providers/onekey-starcoin-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-starcoin-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "eth-rpc-errors": "^4.0.3" } } diff --git a/packages/providers/onekey-sui-provider/package.json b/packages/providers/onekey-sui-provider/package.json index 8a869a94..efbcb913 100644 --- a/packages/providers/onekey-sui-provider/package.json +++ b/packages/providers/onekey-sui-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-sui-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@mysten/wallet-standard": "^0.7.2", - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "eth-rpc-errors": "^4.0.3", "mitt": "^3.0.0" } diff --git a/packages/providers/onekey-tron-provider/package.json b/packages/providers/onekey-tron-provider/package.json index a9cb7c32..c6f7df5e 100644 --- a/packages/providers/onekey-tron-provider/package.json +++ b/packages/providers/onekey-tron-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-tron-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0", + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1", "querystring": "^0.2.1", "sunweb": "^1.0.7", "tronweb": "^5.1.0" diff --git a/packages/providers/onekey-webln-provider/package.json b/packages/providers/onekey-webln-provider/package.json index 2d06c9cd..47cf3a67 100644 --- a/packages/providers/onekey-webln-provider/package.json +++ b/packages/providers/onekey-webln-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-webln-provider", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0", - "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-errors": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1", + "@onekeyfe/extension-bridge-injected": "1.1.56-alpha.1" } } diff --git a/packages/types/package.json b/packages/types/package.json index 2874d2f6..fb7dd892 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-types", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/webview/package.json b/packages/webview/package.json index 99ec3ab9..40248355 100644 --- a/packages/webview/package.json +++ b/packages/webview/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cross-webview", - "version": "1.1.56-alpha.0", + "version": "1.1.56-alpha.1", "keywords": [ "cross-inpage-provider" ], @@ -36,7 +36,7 @@ "react-native-webview": "^11.17.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.0", - "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.0" + "@onekeyfe/cross-inpage-provider-core": "1.1.56-alpha.1", + "@onekeyfe/cross-inpage-provider-types": "1.1.56-alpha.1" } }