diff --git a/.gitignore b/.gitignore index abfd883a..b8b50771 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ yarn-error.log package.json.lerna_backup lerna-debug.log .env -.vscode \ No newline at end of file +.vscode +.history \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index 075cd100..b5b8c101 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-core", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -29,9 +29,9 @@ "build-version-info": "node ./scripts/buildVersionInfo.js" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-events": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-events": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", "events": "^3.3.0", "lodash-es": "^4.17.21", "ms": "^2.1.3" diff --git a/packages/core/src/versionInfo.ts b/packages/core/src/versionInfo.ts index 7510fa27..0dc0673e 100644 --- a/packages/core/src/versionInfo.ts +++ b/packages/core/src/versionInfo.ts @@ -1,5 +1,5 @@ -const version = '2.1.21'; +const version = '2.2.0'; const versionBuild = '2020-0101-1'; export default { diff --git a/packages/desktop/desktop-bridge-injected/package.json b/packages/desktop/desktop-bridge-injected/package.json index 1b04fa67..6ec9184f 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -34,7 +34,7 @@ "electron": "^17.2.0" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0" } } diff --git a/packages/empty/package.json b/packages/empty/package.json index 40c29da4..2ba970c7 100644 --- a/packages/empty/package.json +++ b/packages/empty/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-empty", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/errors/package.json b/packages/errors/package.json index 31142f2f..c547028a 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-errors", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/events/package.json b/packages/events/package.json index 2785963d..e40f5e42 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-events", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/example/package.json b/packages/example/package.json index 23caf1c7..c121a4a7 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-example", - "version": "2.1.23", + "version": "2.2.0", "private": true, "scripts": { "postinstall": "patch-package", @@ -28,17 +28,17 @@ "@metamask/onboarding": "^1.0.1", "@mizuwallet-sdk/core": "^1.4.0", "@mysten/dapp-kit": "0.13.2", - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/onekey-aptos-provider": "2.1.23", - "@onekeyfe/onekey-cardano-provider": "2.1.23", - "@onekeyfe/onekey-conflux-provider": "2.1.23", - "@onekeyfe/onekey-cosmos-provider": "2.1.23", - "@onekeyfe/onekey-near-provider": "2.1.23", - "@onekeyfe/onekey-solana-provider": "2.1.23", - "@onekeyfe/onekey-sui-provider": "2.1.23", - "@onekeyfe/onekey-tron-provider": "2.1.23", - "@onekeyfe/onekey-webln-provider": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/onekey-aptos-provider": "2.2.0", + "@onekeyfe/onekey-cardano-provider": "2.2.0", + "@onekeyfe/onekey-conflux-provider": "2.2.0", + "@onekeyfe/onekey-cosmos-provider": "2.2.0", + "@onekeyfe/onekey-near-provider": "2.2.0", + "@onekeyfe/onekey-solana-provider": "2.2.0", + "@onekeyfe/onekey-sui-provider": "2.2.0", + "@onekeyfe/onekey-tron-provider": "2.2.0", + "@onekeyfe/onekey-webln-provider": "2.2.0", "@polkadot/api": "^9.11.3", "@polkadot/extension-dapp": "^0.47.5", "@radix-ui/react-checkbox": "^1.1.2", diff --git a/packages/extension/extension-bridge-hosted/package.json b/packages/extension/extension-bridge-hosted/package.json index 69f7bd3a..ec650a70 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,8 +28,8 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.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 a8ca9049..c2b10b77 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0" } } diff --git a/packages/injected/package.json b/packages/injected/package.json index fbdfc3a6..ed6e90f3 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-injected", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -42,12 +42,12 @@ "electron": "*" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/desktop-bridge-injected": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", - "@onekeyfe/inpage-providers-hub": "2.1.23", - "@onekeyfe/native-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/desktop-bridge-injected": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0", + "@onekeyfe/inpage-providers-hub": "2.2.0", + "@onekeyfe/native-bridge-injected": "2.2.0", "buffer": "^6.0.3", "crypto-browserify": "^3.12.0" } diff --git a/packages/injected/src/injectedExtension.ts b/packages/injected/src/injectedExtension.ts index 0fce9c60..47db5e87 100644 --- a/packages/injected/src/injectedExtension.ts +++ b/packages/injected/src/injectedExtension.ts @@ -13,7 +13,7 @@ const bridge = (): JsBridgeExtInjected => }); injectJsBridge(bridge); -injectWeb3Provider(); +injectWeb3Provider({ showFloatingButton: true }); console.log('OneKey Provider Ready ', performance.now()); diff --git a/packages/native/native-bridge-injected/package.json b/packages/native/native-bridge-injected/package.json index 7da54e95..f9f92eda 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0" } } diff --git a/packages/providers/inpage-providers-hub/package.json b/packages/providers/inpage-providers-hub/package.json index 67ce2f81..9713ee9a 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -30,26 +30,27 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/onekey-algo-provider": "2.1.23", - "@onekeyfe/onekey-alph-provider": "2.1.23", - "@onekeyfe/onekey-aptos-provider": "2.1.23", - "@onekeyfe/onekey-bfc-provider": "2.1.23", - "@onekeyfe/onekey-btc-provider": "2.1.23", - "@onekeyfe/onekey-cardano-provider": "2.1.23", - "@onekeyfe/onekey-conflux-provider": "2.1.23", - "@onekeyfe/onekey-cosmos-provider": "2.1.23", - "@onekeyfe/onekey-eth-provider": "2.1.23", - "@onekeyfe/onekey-nostr-provider": "2.1.23", - "@onekeyfe/onekey-polkadot-provider": "2.1.23", - "@onekeyfe/onekey-private-provider": "2.1.23", - "@onekeyfe/onekey-scdo-provider": "2.1.23", - "@onekeyfe/onekey-solana-provider": "2.1.23", - "@onekeyfe/onekey-sui-provider": "2.1.23", - "@onekeyfe/onekey-ton-provider": "2.1.23", - "@onekeyfe/onekey-tron-provider": "2.1.23", - "@onekeyfe/onekey-webln-provider": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/onekey-algo-provider": "2.2.0", + "@onekeyfe/onekey-alph-provider": "2.2.0", + "@onekeyfe/onekey-aptos-provider": "2.2.0", + "@onekeyfe/onekey-bfc-provider": "2.2.0", + "@onekeyfe/onekey-btc-provider": "2.2.0", + "@onekeyfe/onekey-cardano-provider": "2.2.0", + "@onekeyfe/onekey-conflux-provider": "2.2.0", + "@onekeyfe/onekey-cosmos-provider": "2.2.0", + "@onekeyfe/onekey-eth-provider": "2.2.0", + "@onekeyfe/onekey-nostr-provider": "2.2.0", + "@onekeyfe/onekey-polkadot-provider": "2.2.0", + "@onekeyfe/onekey-private-provider": "2.2.0", + "@onekeyfe/onekey-scdo-provider": "2.2.0", + "@onekeyfe/onekey-solana-provider": "2.2.0", + "@onekeyfe/onekey-sui-provider": "2.2.0", + "@onekeyfe/onekey-ton-provider": "2.2.0", + "@onekeyfe/onekey-tron-provider": "2.2.0", + "@onekeyfe/onekey-webln-provider": "2.2.0", + "preact": "^10.25.1", "web3": "^1.7.3" }, "devDependencies": { diff --git a/packages/providers/inpage-providers-hub/src/floatingButton/images.tsx b/packages/providers/inpage-providers-hub/src/floatingButton/images.tsx new file mode 100644 index 00000000..1078b540 --- /dev/null +++ b/packages/providers/inpage-providers-hub/src/floatingButton/images.tsx @@ -0,0 +1,9 @@ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ + +export const Logo = ({ style }: { style: any }) => ( + OneKey Logo +) diff --git a/packages/providers/inpage-providers-hub/src/floatingButton/index.tsx b/packages/providers/inpage-providers-hub/src/floatingButton/index.tsx new file mode 100644 index 00000000..f804e776 --- /dev/null +++ b/packages/providers/inpage-providers-hub/src/floatingButton/index.tsx @@ -0,0 +1,746 @@ +import { render } from 'preact'; +import { useEffect, useMemo, useCallback, useRef, useState } from 'preact/hooks'; +import { + IHostSecurity, + EHostSecurityLevel, +} from './type' +import { Logo } from './images'; + +let isInjected = false; +interface i18nText { + title: string; + description: string; + continueMessage: string; + continueLink: string; + addToWhiteListLink: string; + sourceMessage: string; + fetchingDAppInfo: string; + dappListedBy: string; + riskDetection: string; + maliciousDappWarningSourceMessage: string; + verifiedSite: string; + unknown: string; + maliciousSiteWarning: string; + suspectedMaliciousBehavior: string; + lastVerifiedAt: string; + disable: string; + hideOnThisSite: string; + canBeReEnabledInSettings: string; +} + +let i18n: i18nText = {} as i18nText + +const logoStyle = { + width: '28px', + height: '28px', +}; + +const textStyle = { + color: 'rgba(0, 0, 0, 0.61)', + fontSize: '13px', + marginLeft: '8px', +}; + +const containerId = 'onekey-floating-widget'; + +const removeApp = () => { + document.getElementById(containerId)?.remove(); +} + +const useOutsideClick = ( + ref: { current?: HTMLDivElement | null }, + callback: () => void, +) => { + useEffect(() => { + const handleClickOutside = (event: MouseEvent) => { + if ( + ref.current && + !ref.current.contains(event.target as HTMLElement) + ) { + callback(); + } + }; + document.addEventListener('mousedown', handleClickOutside); + return () => { + document.removeEventListener('mousedown', handleClickOutside); + }; + }, [callback, ref]); +}; +function CloseDialog({ onClose }: { onClose: () => void }) { + const dialogRef = useRef(null); + useOutsideClick(dialogRef, onClose); + const handleDisable = useCallback(() => { + void (globalThis as unknown as { + $onekey: { + $private: { + request: ( + arg: { method: string; } + ) => Promise + } + } + }).$onekey.$private.request({ + method: 'wallet_disableFloatingButton', + }); + removeApp(); + }, []) + const handleHideOnSite = useCallback(() => { + void (globalThis as unknown as { + $onekey: { + $private: { + request: ( + arg: { method: string; params: { url: string } } + ) => Promise + } + } + }).$onekey.$private.request({ + method: 'wallet_hideFloatingButtonOnSite', + params: { url: window.location.origin }, + }); + removeApp(); + }, []) + return ( +
+
+ {i18n.hideOnThisSite} +
+
+ {i18n.disable} +
+
+ {i18n.canBeReEnabledInSettings} +
+
+ ); +} + +function IconButton({ + isExpanded, + onClick, + dataLoaded, + isShowCloseDialog, + showCloseDialog, +}: { + isExpanded: boolean; + isShowCloseDialog: boolean; + onClick: () => void; + dataLoaded: boolean; + showCloseDialog: () => void; +}) { + const [showCloseButton, setIsShowCloseButton] = useState(false); + return ( +
{ + if (isExpanded || isShowCloseDialog) { + return; + } + setIsShowCloseButton(true); + }} + onMouseLeave={() => setIsShowCloseButton(false)} + onClick={() => { + if (isShowCloseDialog) { + return; + } + setIsShowCloseButton(false); + onClick(); + }} + > + + {!dataLoaded && ( + + {isExpanded ? i18n.fetchingDAppInfo : ''} + + )} +
{ + event.stopPropagation(); + setIsShowCloseButton(false); + showCloseDialog(); + }} + > + + + +
+
+ ); +} + +function SecurityInfoRow({ + title, + children, +}: { + title: string; + children: any; +}) { + return ( +
+ + {title} + + {children} +
+ ); +} + +function SecurityRiskDetectionRow({ + securityInfo, +}: { + securityInfo: IHostSecurity; +}) { + const { securityElement, securityStatus } = useMemo(() => { + const security = + securityInfo?.checkSources + .filter((item) => item.riskLevel === EHostSecurityLevel.Security) + .map((item) => item.name) + .join(' & ') || ''; + if (security) { + return { + securityStatus: EHostSecurityLevel.Security, + securityElement: ( + <> + + {i18n.verifiedSite} + + + + + + ), + }; + } + const highSecurity = + securityInfo?.checkSources + .filter((item) => item.riskLevel === EHostSecurityLevel.High) + .map((item) => item.name) + .join(' & ') || ''; + + if (highSecurity) { + return { + securityStatus: EHostSecurityLevel.High, + securityElement: ( + <> + + {i18n.maliciousSiteWarning} + + + + + + ), + }; + } + + const mediumSecurity = + securityInfo?.checkSources + .filter((item) => + EHostSecurityLevel.Medium == item.riskLevel, + ) + .map((item) => item.name) + .join(' & ') || ''; + if (mediumSecurity) { + return { + securityStatus: EHostSecurityLevel.Medium, + securityElement: ( + <> + + {i18n.suspectedMaliciousBehavior} + + + + + + ), + }; + } + return { + securityStatus: EHostSecurityLevel.Unknown, + securityElement: ( + + {i18n.unknown} + + ), + }; + }, [securityInfo?.checkSources]); + return ( + +
+ {securityElement} +
+
+ ); +} + +function SecurityInfo({ + securityInfo, + onClose, + showCloseDialog, + +}: { + securityInfo: IHostSecurity; + onClose: () => void; + showCloseDialog: () => void; +}) { + const viewRef = useRef(null); + useOutsideClick(viewRef, onClose); + return ( +
+
+
+
+ {securityInfo?.dapp?.logo ? ( + + ) : ( + + + + + + )} + {securityInfo?.dapp?.name || securityInfo?.host} +
+
{ + onClose(); + setTimeout(() => { + showCloseDialog(); + }, 200) + }} + > + + + +
+
+
+ {securityInfo?.dapp?.origins.length ? ( + +
+ {securityInfo?.dapp?.origins.map((item) => ( + + ))} +
+
+ ) : null} + + {securityInfo?.dapp?.origins.length ? ( + + + {securityInfo.updatedAt} + + + ) : null} +
+
+ + Powered by + + + + OneKey + +
+
+ ); +} + +function App() { + const [isExpanded, setIsExpanded] = useState(false); + const [showSecurityInfo, setIsShowSecurityInfo] = useState(false); + const [securityInfo, setSecurityInfo] = useState(null); + const [showCloseDialog, setIsShowCloseDialog] = useState(false); + + const handleShowCloseDialog = useCallback(() => { + setIsShowCloseDialog(true) + }, []) + + const handleClick = useCallback(async () => { + setIsExpanded(!isExpanded); + setIsShowSecurityInfo(true); + if (!securityInfo) { + const result = await (window as unknown as { + $onekey: { + $private: { + request: (arg: { method: string; params: { url: string } }) => + Promise<{ securityInfo: IHostSecurity }> + } + } + }).$onekey.$private.request({ + method: 'wallet_detectRiskLevel', + params: { url: window.location.origin }, + }); + setSecurityInfo(result.securityInfo); + } + }, [isExpanded, securityInfo]); + + const borderStyle = useMemo( + () => + isExpanded + ? { + borderTopLeftRadius: '12px', + borderBottomLeftRadius: '12px', + borderTopRightRadius: '0px', + borderBottomRightRadius: '0px', + } + : { + boxShadow: '0px 8.57px 17.14px 0px rgba(0, 0, 0, 0.09)', + transition: 'transform 0.3s ease-in-out', + borderRadius: '100px', + }, + [isExpanded], + ); + + return ( +
+ {showSecurityInfo && securityInfo ? ( + { + setIsExpanded(false); + setIsShowSecurityInfo(false); + }} + /> + ) : ( + + )} + {!isExpanded && showCloseDialog && ( + { + setIsShowCloseDialog(false); + }} + /> + )} +
+ ); +} + +export async function injectFloatingButton() { + const { isShow, i18n: i18nResponse } = await (globalThis as unknown as { + $onekey: { + $private: { + request: ( + arg: { method: string; params: { url: string } } + ) => Promise<{ + isShow: boolean, + i18n: i18nText + }> + } + } + }).$onekey.$private.request({ + method: 'wallet_isShowFloatingButton', + params: { url: window.location.origin }, + }); + i18n = i18nResponse + if (!isShow) { + return; + } + + if (isInjected) { + return; + } + + if (!document.body) { + return; + } + isInjected = true; + const div = document.createElement('div'); + document.body.appendChild(div); + render(, document.body, div); +} diff --git a/packages/providers/inpage-providers-hub/src/floatingButton/type.ts b/packages/providers/inpage-providers-hub/src/floatingButton/type.ts new file mode 100644 index 00000000..1a5c0093 --- /dev/null +++ b/packages/providers/inpage-providers-hub/src/floatingButton/type.ts @@ -0,0 +1,52 @@ + +export enum EHostSecurityLevel { + High = 'high', + Medium = 'medium', + Security = 'security', + Unknown = 'unknown', +} +export interface IAttackType { + name: string; + description: string; +} + +export interface IHostSecurityCheckSources { + name: string; + riskLevel: EHostSecurityLevel; +} + +export interface IHostSecurity { + host: string; + level: EHostSecurityLevel; + attackTypes: IAttackType[]; + phishingSite: boolean; + checkSources: IHostSecurityCheckSources[]; + alert: string; + detail?: { + title: string; + content: string; + }; + projectName: string; + createdAt: string; + updatedAt?: string; + dapp?: { + name: string; + logo: string; + description: { + text: string; + }; + tags: { + name: { + text: string; + lokaliseKey: string; + deleted: boolean; + }; + tagId: string; + type: 'success' | 'info' | 'critical' | 'warning' | 'default' | undefined; + }[]; + origins: { + name: string; + logo: string; + }[]; + }; +} \ No newline at end of file diff --git a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts index 971fa1ea..937330fe 100644 --- a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts +++ b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts @@ -30,6 +30,7 @@ import { ProviderBtc, ProviderBtcWallet } from '@onekeyfe/onekey-btc-provider'; import { ProviderAlgo } from '@onekeyfe/onekey-algo-provider'; import { hackAllConnectButtons } from './connectButtonHack'; import { detectWebsiteRiskLevel, listenPageFocus } from './detectRiskWebsite'; +import { injectFloatingButton } from './floatingButton'; import { WALLET_CONNECT_INFO } from './connectButtonHack/consts'; export type IWindowOneKeyHub = { @@ -70,7 +71,7 @@ export type IWindowOneKeyHub = { }; }; -function injectWeb3Provider(): unknown { +function injectWeb3Provider({ showFloatingButton = false }: { showFloatingButton?: boolean } = {}): unknown { if (!window?.$onekey?.jsBridge) { throw new Error('OneKey jsBridge not found.'); } @@ -306,6 +307,9 @@ function injectWeb3Provider(): unknown { } setTimeout(() => { void detectWebsiteRiskLevel(); + if (showFloatingButton) { + void injectFloatingButton(); + } void hackAllConnectButtons(); void listenPageFocus(); }, 1000); diff --git a/packages/providers/inpage-providers-hub/tsconfig.cjs.json b/packages/providers/inpage-providers-hub/tsconfig.cjs.json index 89ae537e..c9cb74c7 100644 --- a/packages/providers/inpage-providers-hub/tsconfig.cjs.json +++ b/packages/providers/inpage-providers-hub/tsconfig.cjs.json @@ -3,6 +3,8 @@ "include": ["./src"], "exclude": ["./src/**/*.spec.ts", "./src/**/__tests__"], "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "preact", "outDir": "./dist/cjs" } } diff --git a/packages/providers/inpage-providers-hub/tsconfig.json b/packages/providers/inpage-providers-hub/tsconfig.json index 0df352ae..9a803681 100644 --- a/packages/providers/inpage-providers-hub/tsconfig.json +++ b/packages/providers/inpage-providers-hub/tsconfig.json @@ -3,6 +3,8 @@ "include": ["./src"], "exclude": ["./src/**/*.spec.ts", "./src/**/__tests__"], "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "preact", "outDir": "./dist" } } diff --git a/packages/providers/inpage-providers-hub/yarn.lock b/packages/providers/inpage-providers-hub/yarn.lock index 22f1113e..ec8503b7 100644 --- a/packages/providers/inpage-providers-hub/yarn.lock +++ b/packages/providers/inpage-providers-hub/yarn.lock @@ -1897,6 +1897,11 @@ playwright@1.44.1, playwright@^1.43.1: optionalDependencies: fsevents "2.3.2" +preact@^10.25.1: + version "10.25.2" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.25.2.tgz#e141e18a547ae0082dae48d044e0d8267e2547d2" + integrity sha512-GEts1EH3oMnqdOIeXhlbBSddZ9nrINd070WBOiPO2ous1orrKGUM4SMDbwyjSWD1iMS2dBvaDjAa5qUhz3TXqw== + prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" diff --git a/packages/providers/onekey-algo-provider/package.json b/packages/providers/onekey-algo-provider/package.json index 36658ca5..a98b2f7d 100644 --- a/packages/providers/onekey-algo-provider/package.json +++ b/packages/providers/onekey-algo-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-algo-provider", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/providers/onekey-alph-provider/package.json b/packages/providers/onekey-alph-provider/package.json index a0fc442c..f544cf18 100644 --- a/packages/providers/onekey-alph-provider/package.json +++ b/packages/providers/onekey-alph-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-alph-provider", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -31,9 +31,9 @@ "@alephium/get-extension-wallet": "^1.5.2", "@alephium/walletconnect-provider": "^1.5.2", "@alephium/web3": "^1.5.2", - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/providers/onekey-aptos-provider/package.json b/packages/providers/onekey-aptos-provider/package.json index 4cddc46c..755417e5 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@aptos-labs/wallet-standard": "^0.2.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0", "@wallet-standard/core": "1.0.3", "eth-rpc-errors": "^4.0.3" }, diff --git a/packages/providers/onekey-bfc-provider/package.json b/packages/providers/onekey-bfc-provider/package.json index 95a98668..d7cc50cc 100644 --- a/packages/providers/onekey-bfc-provider/package.json +++ b/packages/providers/onekey-bfc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-bfc-provider", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@benfen/bfc.js": "0.2.7", - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0", "eth-rpc-errors": "^4.0.3", "mitt": "^3.0.0" }, diff --git a/packages/providers/onekey-btc-provider/package.json b/packages/providers/onekey-btc-provider/package.json index 3f62b360..b6ddd84b 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/providers/onekey-cardano-provider/package.json b/packages/providers/onekey-cardano-provider/package.json index d0697fab..e33505e2 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider", "cardano" @@ -29,9 +29,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/providers/onekey-conflux-provider/package.json b/packages/providers/onekey-conflux-provider/package.json index 1629a7e8..4073a1c5 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/providers/onekey-cosmos-provider/package.json b/packages/providers/onekey-cosmos-provider/package.json index 478e942d..d7864db5 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.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 45e43447..91439ca0 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.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 48b771bf..c2d44a9d 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -35,10 +35,10 @@ "near-api-js": "^0.44.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.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 a86a2225..513a791b 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/providers/onekey-polkadot-provider/package.json b/packages/providers/onekey-polkadot-provider/package.json index fc811c7c..735be1c6 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.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 f79e4bb5..f5a9f099 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/providers/onekey-scdo-provider/package.json b/packages/providers/onekey-scdo-provider/package.json index 85a407b6..2fa85429 100644 --- a/packages/providers/onekey-scdo-provider/package.json +++ b/packages/providers/onekey-scdo-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-scdo-provider", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/providers/onekey-solana-provider/package.json b/packages/providers/onekey-solana-provider/package.json index 406f7d23..43d89ac5 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider", "solona" @@ -29,10 +29,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.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-sui-provider/package.json b/packages/providers/onekey-sui-provider/package.json index cbd97d43..49103e16 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@mysten/wallet-standard": "^0.7.2", - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0", "eth-rpc-errors": "^4.0.3", "mitt": "^3.0.0" } diff --git a/packages/providers/onekey-ton-provider/package.json b/packages/providers/onekey-ton-provider/package.json index cabfb21a..b60a61c1 100644 --- a/packages/providers/onekey-ton-provider/package.json +++ b/packages/providers/onekey-ton-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-ton-provider", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0", "@tonconnect/protocol": "^2.2.6" } } diff --git a/packages/providers/onekey-tron-provider/package.json b/packages/providers/onekey-tron-provider/package.json index e3eecbf5..b8bb76df 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/secp256k1": "1.7.1", - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23", + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0", "querystring": "^0.2.1", "sunweb": "^1.0.7", "tronweb": "^5.3.2" diff --git a/packages/providers/onekey-webln-provider/package.json b/packages/providers/onekey-webln-provider/package.json index d96e59cb..371e707d 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": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-errors": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23", - "@onekeyfe/extension-bridge-injected": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-errors": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0", + "@onekeyfe/extension-bridge-injected": "2.2.0" } } diff --git a/packages/types/package.json b/packages/types/package.json index d0ffbeae..5f1c93b5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-types", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/webview/package.json b/packages/webview/package.json index 8d391240..7bb3254b 100644 --- a/packages/webview/package.json +++ b/packages/webview/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cross-webview", - "version": "2.1.23", + "version": "2.2.0", "keywords": [ "cross-inpage-provider" ], @@ -36,7 +36,7 @@ "react-native-webview": "^11.17.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.23", - "@onekeyfe/cross-inpage-provider-types": "2.1.23" + "@onekeyfe/cross-inpage-provider-core": "2.2.0", + "@onekeyfe/cross-inpage-provider-types": "2.2.0" } }