diff --git a/packages/core/package.json b/packages/core/package.json index 0cf7a3b7..061cd7a3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-core", - "version": "2.1.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -29,9 +29,9 @@ "build-version-info": "node ./scripts/buildVersionInfo.js" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-events": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-events": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", "events": "^3.3.0", "lodash-es": "^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 f121f895..5901dc48 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -34,7 +34,7 @@ "electron": "^17.2.0" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22" } } diff --git a/packages/empty/package.json b/packages/empty/package.json index 888a7128..e5651f50 100644 --- a/packages/empty/package.json +++ b/packages/empty/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-empty", - "version": "2.1.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/errors/package.json b/packages/errors/package.json index 95d4487f..c55b4a33 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-errors", - "version": "2.1.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/events/package.json b/packages/events/package.json index b688ba53..6e3d3c3c 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-events", - "version": "2.1.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/example/package.json b/packages/example/package.json index 976a6962..2a98481e 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-example", - "version": "2.1.21", + "version": "2.1.22", "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.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/onekey-aptos-provider": "2.1.21", - "@onekeyfe/onekey-cardano-provider": "2.1.21", - "@onekeyfe/onekey-conflux-provider": "2.1.21", - "@onekeyfe/onekey-cosmos-provider": "2.1.21", - "@onekeyfe/onekey-near-provider": "2.1.21", - "@onekeyfe/onekey-solana-provider": "2.1.21", - "@onekeyfe/onekey-sui-provider": "2.1.21", - "@onekeyfe/onekey-tron-provider": "2.1.21", - "@onekeyfe/onekey-webln-provider": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/onekey-aptos-provider": "2.1.22", + "@onekeyfe/onekey-cardano-provider": "2.1.22", + "@onekeyfe/onekey-conflux-provider": "2.1.22", + "@onekeyfe/onekey-cosmos-provider": "2.1.22", + "@onekeyfe/onekey-near-provider": "2.1.22", + "@onekeyfe/onekey-solana-provider": "2.1.22", + "@onekeyfe/onekey-sui-provider": "2.1.22", + "@onekeyfe/onekey-tron-provider": "2.1.22", + "@onekeyfe/onekey-webln-provider": "2.1.22", "@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 06de80c6..e2819d9e 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,8 +28,8 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/extension/extension-bridge-injected/package.json b/packages/extension/extension-bridge-injected/package.json index ca125f2b..6edc62de 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22" } } diff --git a/packages/injected/package.json b/packages/injected/package.json index d1ecb382..c170699a 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-injected", - "version": "2.1.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -42,12 +42,12 @@ "electron": "*" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/desktop-bridge-injected": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", - "@onekeyfe/inpage-providers-hub": "2.1.21", - "@onekeyfe/native-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/desktop-bridge-injected": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", + "@onekeyfe/inpage-providers-hub": "2.1.22", + "@onekeyfe/native-bridge-injected": "2.1.22", "buffer": "^6.0.3", "crypto-browserify": "^3.12.0" } diff --git a/packages/native/native-bridge-injected/package.json b/packages/native/native-bridge-injected/package.json index d407ac7c..a941ad0b 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22" } } diff --git a/packages/providers/inpage-providers-hub/package.json b/packages/providers/inpage-providers-hub/package.json index ef30c7c9..76b4a9e6 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -30,26 +30,26 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/onekey-algo-provider": "2.1.21", - "@onekeyfe/onekey-alph-provider": "2.1.21", - "@onekeyfe/onekey-aptos-provider": "2.1.21", - "@onekeyfe/onekey-bfc-provider": "2.1.21", - "@onekeyfe/onekey-btc-provider": "2.1.21", - "@onekeyfe/onekey-cardano-provider": "2.1.21", - "@onekeyfe/onekey-conflux-provider": "2.1.21", - "@onekeyfe/onekey-cosmos-provider": "2.1.21", - "@onekeyfe/onekey-eth-provider": "2.1.21", - "@onekeyfe/onekey-nostr-provider": "2.1.21", - "@onekeyfe/onekey-polkadot-provider": "2.1.21", - "@onekeyfe/onekey-private-provider": "2.1.21", - "@onekeyfe/onekey-scdo-provider": "2.1.21", - "@onekeyfe/onekey-solana-provider": "2.1.21", - "@onekeyfe/onekey-sui-provider": "2.1.21", - "@onekeyfe/onekey-ton-provider": "2.1.21", - "@onekeyfe/onekey-tron-provider": "2.1.21", - "@onekeyfe/onekey-webln-provider": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/onekey-algo-provider": "2.1.22", + "@onekeyfe/onekey-alph-provider": "2.1.22", + "@onekeyfe/onekey-aptos-provider": "2.1.22", + "@onekeyfe/onekey-bfc-provider": "2.1.22", + "@onekeyfe/onekey-btc-provider": "2.1.22", + "@onekeyfe/onekey-cardano-provider": "2.1.22", + "@onekeyfe/onekey-conflux-provider": "2.1.22", + "@onekeyfe/onekey-cosmos-provider": "2.1.22", + "@onekeyfe/onekey-eth-provider": "2.1.22", + "@onekeyfe/onekey-nostr-provider": "2.1.22", + "@onekeyfe/onekey-polkadot-provider": "2.1.22", + "@onekeyfe/onekey-private-provider": "2.1.22", + "@onekeyfe/onekey-scdo-provider": "2.1.22", + "@onekeyfe/onekey-solana-provider": "2.1.22", + "@onekeyfe/onekey-sui-provider": "2.1.22", + "@onekeyfe/onekey-ton-provider": "2.1.22", + "@onekeyfe/onekey-tron-provider": "2.1.22", + "@onekeyfe/onekey-webln-provider": "2.1.22", "web3": "^1.7.3" }, "devDependencies": { diff --git a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/config.ts b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/config.ts index 44486997..88301ee4 100644 --- a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/config.ts +++ b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/config.ts @@ -1,12 +1,7 @@ import { IInjectedProviderNames } from '@onekeyfe/cross-inpage-provider-types'; import { WALLET_CONNECT_INFO, WALLET_NAMES } from '../consts'; import { findIconAndNameByName, findIconAndNameByIcon } from './findIconAndName'; -import { - findWalletIconByParent, - isWalletIconLessEqualThan, - isWalletIconSizeMatch, - replaceIcon, -} from './imgUtils'; +import { isWalletIconLessEqualThan, replaceIcon } from './imgUtils'; import { findIconAndNameInShadowRoot } from './shadowRoot'; import { ConstraintFn, FindResultType, Selector } from './type'; import { @@ -26,7 +21,6 @@ import { replaceText, } from './textUtils'; import domUtils from '../utils/utilsDomNodes'; -import { text } from 'stream/consumers'; type FrameLocator = { locator: (selector: string) => Locator; @@ -149,7 +143,7 @@ export type WalletInfo = { updateIcon?: (this: void, img: HTMLElement, iconStr: string) => HTMLImageElement; updateName?: (this: void, textNode: Text, text: string) => Text; - afterUpdate?: (this: void, textNode: Text, img: HTMLImageElement) => void; + afterUpdate?: (this: void, textNode: Text | null, img: HTMLImageElement | null) => void; /** * used when there is only one icon or name element(not both) and other special cases @@ -194,7 +188,7 @@ const metamaskForRainbowKit: WalletInfo = { return document.querySelector('button[data-testid="rk-wallet-option-metaMask"]'); }, afterUpdate(textNode) { - if (textNode.parentElement) { + if (textNode?.parentElement) { textNode.parentElement.style.whiteSpace = 'normal'; } }, @@ -210,7 +204,19 @@ const walletConnectForRainbowKit: WalletInfo = { return document.querySelector('button[data-testid="rk-wallet-option-walletConnect"]'); }, afterUpdate(textNode) { - if (textNode.parentElement) { + if (textNode?.parentElement) { + textNode.parentElement.style.whiteSpace = 'normal'; + } + }, +}; + +const petraForRainbowKit: WalletInfo = { + ...basicWalletInfo[WALLET_NAMES.petra], + container: () => { + return document.querySelector('button[data-testid="rk-wallet-option-petra"]'); + }, + afterUpdate(textNode) { + if (textNode?.parentElement) { textNode.parentElement.style.whiteSpace = 'normal'; } }, @@ -224,7 +230,7 @@ export const sitesConfig: SitesInfo[] = [ [IInjectedProviderNames.sui]: [ { ...basicWalletInfo['suiwallet'], - container: "div[role='dialog'] .rc-dialog-body > ul", + container: "div[role='dialog'] .rc-dialog-body", }, ], }, @@ -281,7 +287,7 @@ export const sitesConfig: SitesInfo[] = [ }, afterUpdate: (text, img) => { - img.style.marginRight = '12px'; + if (img) img.style.marginRight = '12px'; }, }, ], @@ -336,7 +342,7 @@ export const sitesConfig: SitesInfo[] = [ ...basicWalletInfo['walletconnect'], container: () => getWalletListByBtn("div[role='dialog'] .v-card .c-list"), afterUpdate(textNode, img) { - img.style.height = 'auto'; + if (img) img.style.height = 'auto'; }, }, ], @@ -351,14 +357,14 @@ export const sitesConfig: SitesInfo[] = [ ...basicWalletInfo['metamask'], container: '#metamask', afterUpdate(textNode, img) { - textNode.parentElement && (textNode.parentElement.style.textAlign = 'left'); + textNode?.parentElement && (textNode.parentElement.style.textAlign = 'left'); }, }, { ...basicWalletInfo['walletconnect'], container: '#wallet-connect', afterUpdate(textNode, img) { - textNode.parentElement && (textNode.parentElement.style.textAlign = 'left'); + textNode?.parentElement && (textNode.parentElement.style.textAlign = 'left'); }, }, ], @@ -601,7 +607,7 @@ export const sitesConfig: SitesInfo[] = [ ); }, afterUpdate(textNode, img) { - textNode.parentElement && makeTextEllipse(textNode.parentElement); + textNode?.parentElement && makeTextEllipse(textNode.parentElement); }, }, ], @@ -668,23 +674,23 @@ export const sitesConfig: SitesInfo[] = [ ], }, }, - { - urls: ['app.thala.fi'], - testPath: [':text("I agree")', ':text("Connect")'], - walletsForProvider: { - [IInjectedProviderNames.aptos]: [ - { - ...basicWalletInfo['petra'], - container: () => { - return getConnectWalletModalByTitle('div.chakra-modal__body', 'Welcome to Thala'); - }, - afterUpdate(textNode, img) { - textNode.parentElement && (textNode.parentElement.style.textAlign = 'left'); - }, - }, - ], - }, - }, + // { + // urls: ['app.thala.fi'], + // testPath: [':text("I agree")', ':text("Connect")'], + // walletsForProvider: { + // [IInjectedProviderNames.aptos]: [ + // { + // ...basicWalletInfo['petra'], + // container: () => { + // return getConnectWalletModalByTitle('div.chakra-modal__body', 'Welcome to Thala'); + // }, + // afterUpdate(textNode, img) { + // textNode.parentElement && (textNode.parentElement.style.textAlign = 'left'); + // }, + // }, + // ], + // }, + // }, { urls: ['app.kinza.finance'], testPath: { @@ -1027,7 +1033,7 @@ export const sitesConfig: SitesInfo[] = [ container: () => getConnectWalletModalByTitle('div[style*="opacity: 1"]', 'Connect your wallet'), afterUpdate(textNode, img) { - textNode.parentElement && (textNode.parentElement.style.textAlign = 'center'); + textNode?.parentElement && (textNode.parentElement.style.textAlign = 'center'); }, }, ], @@ -1601,14 +1607,14 @@ export const sitesConfig: SitesInfo[] = [ ...basicWalletInfo['metamask'], container: 'button#wallet-connect-metamask', afterUpdate(textNode, updatedName) { - textNode.parentElement && makeTextEllipse(textNode.parentElement); + textNode?.parentElement && makeTextEllipse(textNode.parentElement); }, }, { ...basicWalletInfo['walletconnect'], container: 'button#wallet-connect-walletconnect', afterUpdate(textNode, updatedName) { - textNode.parentElement && makeTextEllipse(textNode.parentElement); + textNode?.parentElement && makeTextEllipse(textNode.parentElement); }, }, ], @@ -1672,7 +1678,7 @@ export const sitesConfig: SitesInfo[] = [ ...basicWalletInfo['walletconnect'], container: '#wallet-dropdown-scroll-wrapper', afterUpdate(textNode, img) { - textNode.parentElement && (textNode.parentElement.style.textAlign = 'left'); + textNode?.parentElement && (textNode.parentElement.style.textAlign = 'left'); }, }, ], @@ -1810,7 +1816,7 @@ export const sitesConfig: SitesInfo[] = [ ...basicWalletInfo['phantom'], container: '#connect_modal', afterUpdate(text) { - if (text.parentElement?.parentElement) { + if (text?.parentElement?.parentElement) { text.parentElement.parentElement.style.whiteSpace = 'noWrap'; makeTextEllipse(text.parentElement, { maxWidth: 'min(18vw,107px)' }); } @@ -1893,11 +1899,10 @@ export const sitesConfig: SitesInfo[] = [ ...basicWalletInfo['martian'], container: 'div.ant-modal.wallet-modal', }, - //petra不存在 - // { - // ...basicWalletInfo['petra'], - // container: 'div.ant-modal.wallet-modal', - // }, + { + ...basicWalletInfo['petra'], + container: 'div.ant-modal.wallet-modal', + }, ], [IInjectedProviderNames.sui]: [ { @@ -1921,8 +1926,10 @@ export const sitesConfig: SitesInfo[] = [ container: '.connect-wallet-modal', ...basicWalletInfo['walletconnect'], afterUpdate(textNode, img) { - img.style.height = '40px'; - img.style.width = '40px'; + if (img) { + img.style.height = '40px'; + img.style.width = '40px'; + } }, }, ], @@ -2119,8 +2126,10 @@ export const sitesConfig: SitesInfo[] = [ ...basicWalletInfo['metamask'], container: () => getConnectWalletModalByTitle('div.ant-modal-content', 'Select a Wallet'), afterUpdate(textNode, icon) { - icon.style.height = '28px'; - icon.style.width = 'auto'; + if (icon) { + icon.style.height = '28px'; + icon.style.width = 'auto'; + } }, }, ], @@ -2193,7 +2202,7 @@ export const sitesConfig: SitesInfo[] = [ ); }, afterUpdate(textNode) { - textNode.parentElement && makeTextWordBreak(textNode.parentElement); + textNode?.parentElement && makeTextWordBreak(textNode.parentElement); }, }, { @@ -2211,7 +2220,7 @@ export const sitesConfig: SitesInfo[] = [ ); }, afterUpdate(textNode) { - textNode.parentElement && makeTextWordBreak(textNode.parentElement); + textNode?.parentElement && makeTextWordBreak(textNode.parentElement); }, }, ], @@ -2375,12 +2384,14 @@ export const sitesConfig: SitesInfo[] = [ ...basicWalletInfo['metamask'], container: 'div.SelectWalletModal', afterUpdate(textNode, icon) { - if (textNode.parentElement) { + if (textNode?.parentElement) { makeTextEllipse(textNode.parentElement, { width: '100%' }); textNode.parentElement.style.flexShrink = '0'; // textNode.parentElement.style.width = '100%'; } - icon.style.height = 'auto'; + if (icon) { + icon.style.height = 'auto'; + } }, }, ], @@ -2409,7 +2420,9 @@ export const sitesConfig: SitesInfo[] = [ ); }, afterUpdate(textNode, icon) { - icon.style.marginRight = '12px'; + if (icon) { + icon.style.marginRight = '12px'; + } }, }, ], @@ -2432,7 +2445,9 @@ export const sitesConfig: SitesInfo[] = [ ); }, afterUpdate(textNode, icon) { - icon.style.marginRight = '12px'; + if (icon) { + icon.style.marginRight = '12px'; + } }, }, ], @@ -2733,10 +2748,12 @@ export const sitesConfig: SitesInfo[] = [ return findIconAndNameInShadowRoot('onboard-v2', container as string, name); }, afterUpdate(textNode, img) { - img.style.width = '32px'; - img.style.height = '32px'; - img.style.maxWidth = '32px'; - img.style.maxHeight = '32px'; + if (img) { + img.style.width = '32px'; + img.style.height = '32px'; + img.style.maxWidth = '32px'; + img.style.maxHeight = '32px'; + } }, }, { @@ -2746,10 +2763,12 @@ export const sitesConfig: SitesInfo[] = [ return findIconAndNameInShadowRoot('onboard-v2', container as string, name); }, afterUpdate(textNode, img) { - img.style.width = '32px'; - img.style.height = '32px'; - img.style.maxWidth = '32px'; - img.style.maxHeight = '32px'; + if (img) { + img.style.width = '32px'; + img.style.height = '32px'; + img.style.maxWidth = '32px'; + img.style.maxHeight = '32px'; + } }, }, ], @@ -2782,7 +2801,7 @@ export const sitesConfig: SitesInfo[] = [ : null; }, afterUpdate(textNode, img) { - if (textNode.parentElement) { + if (textNode?.parentElement) { textNode.parentElement.style.overflow = 'visible'; } }, @@ -2807,7 +2826,7 @@ export const sitesConfig: SitesInfo[] = [ : null; }, afterUpdate(textNode, img) { - if (textNode.parentElement) { + if (textNode?.parentElement) { textNode.parentElement.style.overflow = 'visible'; } }, @@ -2866,8 +2885,10 @@ export const sitesConfig: SitesInfo[] = [ ); }, afterUpdate(textNode, iconNode) { - iconNode.style.aspectRatio = '1'; - iconNode.style.minWidth = '32px'; + if (iconNode) { + iconNode.style.aspectRatio = '1'; + iconNode.style.minWidth = '32px'; + } }, }, { @@ -2888,13 +2909,15 @@ export const sitesConfig: SitesInfo[] = [ ); }, afterUpdate(textNode, iconNode) { - iconNode.style.aspectRatio = '1'; - iconNode.style.minWidth = '32px'; - const { defaultVal } = getMaxWithOfText(textNode, iconNode); - textNode.parentElement && - makeTextEllipse(textNode.parentElement, { - maxWidth: defaultVal, - }); + if (iconNode && textNode) { + iconNode.style.aspectRatio = '1'; + iconNode.style.minWidth = '32px'; + const { defaultVal } = getMaxWithOfText(textNode, iconNode); + textNode.parentElement && + makeTextEllipse(textNode.parentElement, { + maxWidth: defaultVal, + }); + } }, }, ], @@ -2942,20 +2965,6 @@ export const sitesConfig: SitesInfo[] = [ [IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit], }, }, - { - urls: ['app.cellana.finance'], - - walletsForProvider: { - [IInjectedProviderNames.aptos]: [ - { - ...basicWalletInfo['petra'], - name: /^Petra Wallet$/, - container: () => - getConnectWalletModalByTitle('div.ant-modal[role="dialog"]', 'Connect a wallet'), - }, - ], - }, - }, { urls: ['www.vaultka.com'], testPath: { @@ -3098,7 +3107,7 @@ export const sitesConfig: SitesInfo[] = [ container: () => getConnectWalletModalByTitle('div[role="dialog"]', 'Connect wallet to continue'), afterUpdate(textNode) { - textNode.parentElement && makeTextAlignCenter(textNode.parentElement); + textNode?.parentElement && makeTextAlignCenter(textNode.parentElement); }, }, ], @@ -3108,7 +3117,7 @@ export const sitesConfig: SitesInfo[] = [ container: () => getConnectWalletModalByTitle('div[role="dialog"]', 'Connect wallet to continue'), afterUpdate(textNode) { - textNode.parentElement && makeTextAlignCenter(textNode.parentElement); + textNode?.parentElement && makeTextAlignCenter(textNode.parentElement); }, }, ], @@ -3286,7 +3295,7 @@ export const sitesConfig: SitesInfo[] = [ ); }, afterUpdate(textNode) { - textNode.parentElement && makeTextAlignLeft(textNode.parentElement); + textNode?.parentElement && makeTextAlignLeft(textNode.parentElement); }, }, ], @@ -3362,7 +3371,7 @@ export const sitesConfig: SitesInfo[] = [ 'Connect your wallet', ), afterUpdate(textNode) { - textNode.parentElement && makeTextWrap(textNode.parentElement); + textNode?.parentElement && makeTextWrap(textNode.parentElement); }, }, ], @@ -3518,18 +3527,6 @@ export const sitesConfig: SitesInfo[] = [ ], }, }, - { - urls: ['app.aptin.io'], - walletsForProvider: { - [IInjectedProviderNames.aptos]: [ - { - ...basicWalletInfo['petra'], - container: () => - getConnectWalletModalByTitle('div.MuiPaper-root.aptin-dialog', 'Connect a wallet'), - }, - ], - }, - }, { urls: ['juicebox.money'], testPath: { @@ -3912,7 +3909,7 @@ export const sitesConfig: SitesInfo[] = [ return findIconAndNameInShadowRoot('onboard-v2', container as string, name); }, afterUpdate(textNode) { - textNode.parentElement && makeTextAlignLeft(textNode.parentElement); + textNode?.parentElement && makeTextAlignLeft(textNode.parentElement); }, }, ], @@ -4020,4 +4017,280 @@ export const sitesConfig: SitesInfo[] = [ ], }, }, + { + urls: ['typus.finance'], + testUrls: ['typus.finance/safu'], + testPath: [':text("CONNECT WALLET")'], + + walletsForProvider: { + [IInjectedProviderNames.sui]: [ + { + ...basicWalletInfo['suiwallet'], + findIconAndName() { + const modal = getConnectWalletModalByTitle( + 'section.chakra-modal__content', + 'Connect a Wallet', + ); + const ele = modal?.querySelector('div'); + return (ele && findIconAndNameByName(ele, /^Sui$/i, 'auto-search-icon')) ?? null; + }, + }, + ], + }, + }, + { + urls: ['app.bucketprotocol.io'], + walletsForProvider: { + [IInjectedProviderNames.sui]: [ + { + ...basicWalletInfo['suiwallet'], + container: 'div[role="dialog"]', + findIconAndName({ name, container }) { + const modal = getConnectWalletModalByTitle( + container as string, + 'Connect a Wallet from list', + ); + return (modal && findIconAndNameByName(modal, name, 'auto-search-icon')) ?? null; + }, + }, + ], + }, + }, + { + urls: ['mainnet.aux.exchange'], + + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: '[id^="headlessui-dialog-panel-"]', + findIconAndName({ name, container }) { + const modal = getConnectWalletModalByTitle(container as string, 'Select Wallet'); + return ( + (modal && + findIconAndNameByName(modal, name, 'auto-search-icon', { + icon: [isWalletIconLessEqualThan], + text: [], + })) ?? + null + ); + }, + }, + ], + }, + }, + { + urls: ['aptoswap.net'], + testUrls: ['aptoswap.net/app'], + + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: 'div.modal-background-content-frame .modal-wallet-frame', + findIconAndName({ name, container }) { + const modal = getConnectWalletModalByTitle(container as string, 'Sellect Your Wallet'); + return ( + (modal && + findIconAndNameByName(modal, name, 'auto-search-icon', { + icon: [ + isWalletIconLessEqualThan, + (walletIcon) => walletIcon.getAttribute('aria-hidden') !== 'true', + ], + text: [], + })) ?? + null + ); + }, + }, + ], + }, + }, + { + urls: ['abelfinance.xyz'], + + constraintMap: { + icon: [isWalletIconLessEqualThan], + text: [], + }, + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: 'div.ant-modal .ant-modal-content .ant-modal-body', + }, + ], + }, + }, + { + urls: ['stake.dittofinance.io'], + + constraintMap: { + icon: [isWalletIconLessEqualThan], + text: [], + }, + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: 'div.modal-enter-done div[class*="WalletList"]', + }, + ], + }, + }, + { + urls: ['www.emojicoin.fun'], + + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: '[id^="headlessui-dialog-panel-"]', + findIconAndName({ name, container }) { + const modal = getConnectWalletModalByTitle(container as string, 'LOG IN OR SIGN UP'); + return ( + (modal && + findIconAndNameByName(modal, /^PETRA$/i, 'none', { + icon: [isWalletIconLessEqualThan], + text: [], + })) ?? + null + ); + }, + }, + ], + }, + }, + { + urls: ['app.tortuga.finance'], + + constraintMap: { + icon: [isWalletIconLessEqualThan], + text: [], + }, + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: 'dialog.dialog div.dialog-content', + }, + ], + }, + }, + { + urls: ['app.merkle.trade'], + walletsForProvider: { + [IInjectedProviderNames.aptos]: [petraForRainbowKit], + }, + }, + { + urls: ['app.panora.exchange'], + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: 'div#full-width-tabpanel-0 .MuiBox-root', + }, + ], + }, + }, + { + urls: ['trade.echelon.market'], + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: '[id^="headlessui-dialog-panel-"]', + findIconAndName({ name, container }) { + const modal = getConnectWalletModalByTitle(container as string, 'Welcome to Echelon'); + return ( + (modal && + findIconAndNameByName(modal, name, 'none', { + icon: [ + isWalletIconLessEqualThan, + (walletIcon) => !walletIcon.classList.contains('arrow'), + ], + text: [isClickable], + })) ?? + null + ); + }, + }, + ], + }, + }, + { + urls: ['trade.baptswap.com'], + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: '[id^="headlessui-dialog-panel-"]', + findIconAndName({ name, container }) { + const modal = getConnectWalletModalByTitle(container as string, 'Connect a Wallet'); + return ( + (modal && + findIconAndNameByName(modal, name, 'none', { + icon: [ + isWalletIconLessEqualThan, + (walletIcon) => !walletIcon.classList.contains('arrow'), + ], + text: [isClickable], + })) ?? + null + ); + }, + }, + ], + }, + }, + { + urls: ['app.superposition.finance'], + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: 'div.account-wallets-outer div.account-wallet-list', + }, + ], + }, + }, + { + urls: ['app.trufin.io'], + + constraintMap: { + icon: [isWalletIconLessEqualThan], + text: [], + }, + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: 'div.MuiDialogContent-root div.MuiGrid-container', + }, + ], + }, + }, + { + urls: ['app.mole.fi'], + + constraintMap: { + icon: [isWalletIconLessEqualThan], + text: [], + }, + walletsForProvider: { + [IInjectedProviderNames.aptos]: [ + { + ...basicWalletInfo['petra'], + container: 'div#connectWallet div.wallet-list', + }, + ], + [IInjectedProviderNames.sui]: [ + { + ...basicWalletInfo['suiwallet'], + container: 'div#connectWallet div.wallet-list', + }, + ], + }, + }, ]; diff --git a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/findIconAndName.ts b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/findIconAndName.ts index 985ecb8e..c650945e 100644 --- a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/findIconAndName.ts +++ b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/findIconAndName.ts @@ -12,19 +12,22 @@ import { arrayify, isClickable, isInExternalLink, universalLog } from './utils'; export function findIconAndNameByName( containerElement: HTMLElement, walletName: RegExp, - icon: 'auto-search-icon' | ((text: Text) => HTMLElement | null | undefined) = 'auto-search-icon', + icon: + | 'none' + | 'auto-search-icon' + | ((text: Text) => HTMLElement | null | undefined) = 'auto-search-icon', constraints: { text: ConstraintFn[]; icon: ConstraintFn[] } = { text: [isClickable], icon: [isWalletIconLessEqualThan, isClickable], -}, + }, ): FindResultType | null { const textNode = findWalletTextByParent(containerElement, walletName, constraints.text); if (!textNode || !textNode.parentElement) { - universalLog.log(`no wallet name ${walletName.toString()} text node found`); + universalLog.debug(`no wallet name ${walletName.toString()} text node found`); return null; } if (isInExternalLink(textNode.parentElement, containerElement)) { - universalLog.log(`${walletName.toString()} is in external link`); + universalLog.debug(`${walletName.toString()} is in external link`); return null; } @@ -43,17 +46,17 @@ export function findIconAndNameByName( iconNode = walletIcon; break; } - } else { + } else if (typeof icon === 'string' && icon !== 'none') { universalLog.warn('icon paramter should be a function or auto-search-icon'); return null; } - if (!iconNode) { - universalLog.log(`no wallet ${walletName.toString()} icon node found`); + if (!iconNode && typeof icon === 'string' && icon !== 'none') { + universalLog.debug(`no wallet ${walletName.toString()} icon node found`); return null; } // make sure the icon and text are both existed - return { iconNode, textNode }; + return { iconNode: iconNode ?? null, textNode }; } export function findIconAndNameByIcon( diff --git a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/imgUtils.ts b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/imgUtils.ts index 9774f38a..f7522faa 100644 --- a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/imgUtils.ts +++ b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/imgUtils.ts @@ -57,15 +57,18 @@ export function findWalletIconByParent(parent: HTMLElement, constraints: Constra universalLog.warn(`no icon node found for parent`, parent); return null; } - if (iconNodes.length > 1) { + + const filteredIconNodes = iconNodes.filter((icon) => constraints.every((f) => f(icon))); + + if (filteredIconNodes.length === 0) { + throw new Error('it doesnt satisfy the constraints'); + } + + if (filteredIconNodes.length > 1) { universalLog.warn(`more than one icon node found`, iconNodes.length, iconNodes); throw new Error('more than one icon node found'); } - const icon = iconNodes[0]; - if (constraints.some((f) => !f(icon))) { - throw new Error('it doesnt satisfy the constraints'); - } - return icon; + return filteredIconNodes[0]; } //NOTE: use function isWalletIconLessEqualThan with lazy loading image export function isWalletIconSizeMatch( diff --git a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/index.ts b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/index.ts index d1d163f3..fa3079d2 100644 --- a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/index.ts +++ b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/index.ts @@ -74,10 +74,16 @@ function hackWalletConnectButton(sites: SitesInfo[]) { continue; } const { textNode, iconNode } = result; - if (textNode && iconNode) { - const newText = updateName(textNode, updatedName); - const newIconElement = updateIcon(iconNode, updatedIcon); + let newText: Text | null = null; + let newIconElement: HTMLImageElement | null = null; + if (textNode) { + newText = updateName(textNode, updatedName); + } + if (iconNode) { + newIconElement = updateIcon(iconNode, updatedIcon); walletId.updateFlag(newIconElement); + } + if (newText || newIconElement) { afterUpdate?.(newText, newIconElement); } } catch (e) { diff --git a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/type.ts b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/type.ts index 9f9f33f4..91663139 100644 --- a/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/type.ts +++ b/packages/providers/inpage-providers-hub/src/connectButtonHack/universal/type.ts @@ -1,6 +1,6 @@ export type Selector = string; export type FindResultType = { - iconNode: HTMLElement; + iconNode: HTMLElement | null; textNode: Text; }; export type ConstraintFn = (ele: HTMLElement) => boolean; diff --git a/packages/providers/onekey-algo-provider/package.json b/packages/providers/onekey-algo-provider/package.json index c64c498e..6eb2abd8 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/providers/onekey-alph-provider/package.json b/packages/providers/onekey-alph-provider/package.json index 7b4d8596..4bd1c545 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.21", + "version": "2.1.22", "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.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/providers/onekey-aptos-provider/package.json b/packages/providers/onekey-aptos-provider/package.json index be61e8ed..cb379e42 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@aptos-labs/wallet-standard": "^0.2.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "@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 8bdd167c..6578166b 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@benfen/bfc.js": "0.2.7", - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "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 3460b17c..f08b2c7e 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/providers/onekey-cardano-provider/package.json b/packages/providers/onekey-cardano-provider/package.json index a2513c94..00ac4955 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider", "cardano" @@ -29,9 +29,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/providers/onekey-conflux-provider/package.json b/packages/providers/onekey-conflux-provider/package.json index d7dec3ce..87594250 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/providers/onekey-cosmos-provider/package.json b/packages/providers/onekey-cosmos-provider/package.json index 0ed860e9..03cdfa3e 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "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 888e6baa..ad289c22 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "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 97b3a2a6..93366c89 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -35,10 +35,10 @@ "near-api-js": "^0.44.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "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 4f8679b9..1089391e 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/providers/onekey-polkadot-provider/package.json b/packages/providers/onekey-polkadot-provider/package.json index 5b26cbd3..e9956118 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "@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 96de0a21..c5050dea 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/providers/onekey-scdo-provider/package.json b/packages/providers/onekey-scdo-provider/package.json index 1cb134c8..8cebbcb1 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/providers/onekey-solana-provider/package.json b/packages/providers/onekey-solana-provider/package.json index 3e6a5859..12968e2f 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider", "solona" @@ -29,10 +29,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "@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 b94db3f5..12de72af 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@mysten/wallet-standard": "^0.7.2", - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "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 04a55631..8f93fd9b 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "@tonconnect/protocol": "^2.2.6" } } diff --git a/packages/providers/onekey-tron-provider/package.json b/packages/providers/onekey-tron-provider/package.json index 435560e5..1e6e0be4 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/secp256k1": "1.7.1", - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21", + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22", "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 6f87f604..02caa29c 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.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-errors": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21", - "@onekeyfe/extension-bridge-injected": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-errors": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22", + "@onekeyfe/extension-bridge-injected": "2.1.22" } } diff --git a/packages/types/package.json b/packages/types/package.json index b9374758..a9fb34d4 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-types", - "version": "2.1.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/webview/package.json b/packages/webview/package.json index 52299e6a..69db90b3 100644 --- a/packages/webview/package.json +++ b/packages/webview/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cross-webview", - "version": "2.1.21", + "version": "2.1.22", "keywords": [ "cross-inpage-provider" ], @@ -36,7 +36,7 @@ "react-native-webview": "^11.17.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.21", - "@onekeyfe/cross-inpage-provider-types": "2.1.21" + "@onekeyfe/cross-inpage-provider-core": "2.1.22", + "@onekeyfe/cross-inpage-provider-types": "2.1.22" } }