@onekeyfe/inpage-providers-hub 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -584,7 +584,7 @@ exports.sitesConfig = [
584
584
  },
585
585
  },
586
586
  {
587
- urls: ['bifrost.app'],
587
+ urls: ['bifrost.app', 'app.bifrost.io'],
588
588
  walletsForProvider: {
589
589
  [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
590
590
  Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
@@ -742,6 +742,8 @@ exports.sitesConfig = [
742
742
  const icon = (_b = (_a = modal === null || modal === void 0 ? void 0 : modal.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.querySelector('img[alt="walletconnect wallet logo"][src*="walletconnect.svg"]');
743
743
  return icon ? (0, imgUtils_1.replaceIcon)(icon, updatedIcon) : null;
744
744
  } }),
745
+ metamaskForRainbowKit,
746
+ walletConnectForRainbowKit,
745
747
  ],
746
748
  },
747
749
  },
@@ -780,6 +782,12 @@ exports.sitesConfig = [
780
782
  [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
781
783
  },
782
784
  },
785
+ {
786
+ urls: ['app.redacted.finance'],
787
+ walletsForProvider: {
788
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
789
+ },
790
+ },
783
791
  {
784
792
  urls: ['www.inverse.finance'],
785
793
  testPath: [':text("Enter App")', ':text("Connect")'],
@@ -1374,23 +1382,29 @@ exports.sitesConfig = [
1374
1382
  ],
1375
1383
  },
1376
1384
  },
1377
- // {
1378
- // urls: ['stbt.matrixdock.com'],
1379
- // walletsForProvider: {
1380
- // [IInjectedProviderNames.ethereum]: [
1381
- // {
1382
- // ...basicWalletInfo['metamask'],
1383
- // findIconAndName({ name }) {
1384
- // const modal = getConnectWalletModalByTitle('div.inside', 'Connect Wallet');
1385
- // return (
1386
- // modal &&
1387
- // findIconAndNameDirectly('img[src*="metamask.png"]', 'auto-search-text', name, modal)
1388
- // );
1389
- // },
1390
- // },
1391
- // ],
1392
- // },
1393
- // },
1385
+ {
1386
+ urls: ['stbt.matrixdock.com', 'app.matrixdock.com'],
1387
+ walletsForProvider: {
1388
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
1389
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
1390
+ const modal = (0, utils_1.getConnectWalletModalByTitle)('div.dialog-container', 'Available Wallets');
1391
+ return (modal &&
1392
+ (0, findIconAndName_1.findIconAndNameByIcon)('img[src*="icon-metamask"]', 'auto-search-text', name, modal));
1393
+ },
1394
+ afterUpdate(textNode) {
1395
+ textNode.parentElement && (0, textUtils_1.makeTextWordBreak)(textNode.parentElement);
1396
+ } }),
1397
+ Object.assign(Object.assign({}, exports.basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
1398
+ const modal = (0, utils_1.getConnectWalletModalByTitle)('div.dialog-container', 'Available Wallets');
1399
+ return (modal &&
1400
+ (0, findIconAndName_1.findIconAndNameByIcon)('img[src*="icon-wallet-connect"]', 'auto-search-text', name, modal));
1401
+ },
1402
+ afterUpdate(textNode) {
1403
+ textNode.parentElement && (0, textUtils_1.makeTextWordBreak)(textNode.parentElement);
1404
+ } }),
1405
+ ],
1406
+ },
1407
+ },
1394
1408
  {
1395
1409
  urls: ['spooky.fi'],
1396
1410
  walletsForProvider: {
@@ -2110,7 +2124,7 @@ exports.sitesConfig = [
2110
2124
  },
2111
2125
  },
2112
2126
  {
2113
- urls: ['nftx.io'],
2127
+ urls: ['nftx.io', 'v3.nftx.io'],
2114
2128
  walletsForProvider: {
2115
2129
  [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [metamaskForRainbowKit],
2116
2130
  },
@@ -2382,7 +2396,6 @@ exports.sitesConfig = [
2382
2396
  },
2383
2397
  {
2384
2398
  urls: ['keep3r.network'],
2385
- only: true,
2386
2399
  testPath: {
2387
2400
  desktop: [':text("Connect wallet")'],
2388
2401
  mobile: ['button.fixed.flex'],
@@ -2393,4 +2406,165 @@ exports.sitesConfig = [
2393
2406
  ],
2394
2407
  },
2395
2408
  },
2409
+ {
2410
+ urls: ['ape.bond'],
2411
+ walletsForProvider: {
2412
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
2413
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: '#wallet-connect-metamask' }),
2414
+ ],
2415
+ },
2416
+ },
2417
+ {
2418
+ urls: ['deri.io'],
2419
+ testUrls: ['deri.io/#/lite/trade/futures/BTCUSD'],
2420
+ constraintMap: { icon: [imgUtils_1.isWalletIconLessEqualThan], text: [] },
2421
+ walletsForProvider: {
2422
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
2423
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: '.dialog.wallet-modal' }),
2424
+ ],
2425
+ },
2426
+ },
2427
+ {
2428
+ urls: ['bridge.wing.finance'],
2429
+ walletsForProvider: {
2430
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
2431
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: '.bridge-list__content .wallet_type' }),
2432
+ ],
2433
+ },
2434
+ },
2435
+ {
2436
+ urls: ['helixapp.com'],
2437
+ testPath: [':text("Connect Wallet")', ':text("Confirm")'],
2438
+ walletsForProvider: {
2439
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
2440
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: () => (0, utils_1.getConnectWalletModalByTitle)('.fixed.backdrop-filter .modal-container', 'Popular') }),
2441
+ ],
2442
+ [cross_inpage_provider_types_1.IInjectedProviderNames.cosmos]: [
2443
+ Object.assign(Object.assign({}, exports.basicWalletInfo['keplr']), { container: () => (0, utils_1.getConnectWalletModalByTitle)('.fixed.backdrop-filter .modal-container', 'Popular') }),
2444
+ ],
2445
+ // [IInjectedProviderNames.solana]: [
2446
+ // {
2447
+ // ...basicWalletInfo['phantom'],
2448
+ // container: () =>
2449
+ // getConnectWalletModalByTitle(
2450
+ // '.fixed.backdrop-filter .modal-container',
2451
+ // 'Other Wallets',
2452
+ // ),
2453
+ // },
2454
+ // ],
2455
+ },
2456
+ },
2457
+ {
2458
+ urls: ['app.ux.xyz'],
2459
+ testPath: ['button:has-text("Yes")', ':text("Connect")'],
2460
+ skip: { mobile: true },
2461
+ walletsForProvider: {
2462
+ [cross_inpage_provider_types_1.IInjectedProviderNames.cosmos]: [
2463
+ Object.assign(Object.assign({}, exports.basicWalletInfo['keplr']), { name: /^Keplr Wallet$/, container: () => (0, utils_1.getConnectWalletModalByTitle)('div.modal-layer', 'Connect Wallet') }),
2464
+ ],
2465
+ },
2466
+ },
2467
+ {
2468
+ urls: ['app-v2.acryptos.com'],
2469
+ skip: { mobile: true },
2470
+ walletsForProvider: {
2471
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
2472
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: '#WEB3_CONNECT_MODAL_ID' }),
2473
+ ],
2474
+ },
2475
+ },
2476
+ {
2477
+ urls: ['fusionx.finance'],
2478
+ testUrls: ['fusionx.finance/swap'],
2479
+ walletsForProvider: {
2480
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
2481
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { name: /^Metamask$/, findIconAndName({ name }) {
2482
+ const modal = (0, utils_1.getConnectWalletModalByTitle)('#portal-root div[role="dialog"]', 'Connect Wallet');
2483
+ return (modal &&
2484
+ (0, findIconAndName_1.findIconAndNameByIcon)('img[src*="metamask"]', 'auto-search-text', name, modal));
2485
+ } }),
2486
+ ],
2487
+ },
2488
+ },
2489
+ {
2490
+ urls: ['app.optim.finance'],
2491
+ walletsForProvider: {
2492
+ [cross_inpage_provider_types_1.IInjectedProviderNames.cardano]: [
2493
+ Object.assign(Object.assign({}, exports.basicWalletInfo['nami']), { findIconAndName({ name }) {
2494
+ const modal = (0, utils_1.getConnectWalletModalByTitle)('div.backdrop-blur[class*="Modal"]', 'Select Wallet');
2495
+ return (modal &&
2496
+ (0, findIconAndName_1.findIconAndNameByIcon)('img[src*="nami"][alt="Nami"]', 'auto-search-text', name, modal));
2497
+ } }),
2498
+ ],
2499
+ },
2500
+ },
2501
+ {
2502
+ urls: ['autofarm.network'],
2503
+ testPath: [':text("Wallet")'],
2504
+ walletsForProvider: {
2505
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
2506
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: '.modal .outer-container div.wallets-container ', findIconAndName: ({ container, name }) => {
2507
+ return (0, shadowRoot_1.findIconAndNameInShadowRoot)('onboard-v2', container, name);
2508
+ }, afterUpdate(textNode) {
2509
+ textNode.parentElement && (0, textUtils_1.makeTextAlignLeft)(textNode.parentElement);
2510
+ } }),
2511
+ ],
2512
+ },
2513
+ },
2514
+ {
2515
+ urls: ['app.wingriders.com'],
2516
+ testPath: {
2517
+ desktop: [
2518
+ 'button:has-text("Got it")',
2519
+ 'button:has-text("I Agree")',
2520
+ ':text("Connect Wallet")',
2521
+ ],
2522
+ mobile: [
2523
+ 'button:has-text("Got it")',
2524
+ 'button:has-text("I Agree")',
2525
+ 'header button svg',
2526
+ ':text("Connect Wallet")',
2527
+ ],
2528
+ },
2529
+ walletsForProvider: {
2530
+ [cross_inpage_provider_types_1.IInjectedProviderNames.cardano]: [
2531
+ Object.assign(Object.assign({}, exports.basicWalletInfo['nami']), { findIconAndName({ name }) {
2532
+ const modal = (0, utils_1.getConnectWalletModalByTitle)('div.MuiDialog-container', 'Connect to WingRiders');
2533
+ return (modal &&
2534
+ (0, findIconAndName_1.findIconAndNameByIcon)('img[src*="nami"][alt="Nami wallet"]', 'auto-search-text', name, modal));
2535
+ } }),
2536
+ ],
2537
+ },
2538
+ },
2539
+ {
2540
+ urls: ['app.vyfi.io'],
2541
+ walletsForProvider: {
2542
+ [cross_inpage_provider_types_1.IInjectedProviderNames.cardano]: [
2543
+ Object.assign(Object.assign({}, exports.basicWalletInfo['nami']), { container: '#wallet-connect-nami' }),
2544
+ ],
2545
+ },
2546
+ },
2547
+ {
2548
+ urls: ['wemixonkroma.xyz'],
2549
+ walletsForProvider: {
2550
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
2551
+ Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: '.wallet-modal-connect-button' }),
2552
+ ],
2553
+ },
2554
+ },
2555
+ {
2556
+ urls: ['app.arcade.xyz'],
2557
+ walletsForProvider: {
2558
+ [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [metamaskForRainbowKit],
2559
+ },
2560
+ },
2561
+ {
2562
+ urls: ['app.quarry.so'],
2563
+ testPath: [':text("Connect Wallet")', ':text("Continue")'],
2564
+ walletsForProvider: {
2565
+ [cross_inpage_provider_types_1.IInjectedProviderNames.solana]: [
2566
+ Object.assign(Object.assign({}, exports.basicWalletInfo['phantom']), { container: () => (0, utils_1.getConnectWalletModalByTitle)('.goki-walletkit-modal-wrapper', 'Select your wallet') }),
2567
+ ],
2568
+ },
2569
+ },
2396
2570
  ];
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.findWalletTextByParent = exports.replaceText = exports.makeTextAlignCenter = exports.makeTextAlignLeft = exports.makeTextWrap = exports.makeTextEllipse = void 0;
6
+ exports.findWalletTextByParent = exports.replaceText = exports.makeTextAlignCenter = exports.makeTextAlignLeft = exports.makeTextWordBreak = exports.makeTextWrap = exports.makeTextEllipse = void 0;
7
7
  const utilsDomNodes_1 = __importDefault(require("../utils/utilsDomNodes"));
8
8
  const utils_1 = require("./utils");
9
9
  function makeTextEllipse(textNode, option = {}) {
@@ -17,6 +17,10 @@ function makeTextWrap(textNode) {
17
17
  textNode.style.whiteSpace = 'normal';
18
18
  }
19
19
  exports.makeTextWrap = makeTextWrap;
20
+ function makeTextWordBreak(textNode) {
21
+ textNode.style.wordBreak = 'break-word';
22
+ }
23
+ exports.makeTextWordBreak = makeTextWordBreak;
20
24
  function makeTextAlignLeft(textNode) {
21
25
  textNode.style.textAlign = 'left';
22
26
  }
@@ -4,12 +4,12 @@ exports.injectWeb3Provider = void 0;
4
4
  const onekey_eth_provider_1 = require("@onekeyfe/onekey-eth-provider");
5
5
  const onekey_private_provider_1 = require("@onekeyfe/onekey-private-provider");
6
6
  const onekey_solana_provider_1 = require("@onekeyfe/onekey-solana-provider");
7
- const onekey_starcoin_provider_1 = require("@onekeyfe/onekey-starcoin-provider");
7
+ // import { ProviderStarcoin } from '@onekeyfe/onekey-starcoin-provider';
8
8
  const onekey_aptos_provider_1 = require("@onekeyfe/onekey-aptos-provider");
9
9
  const onekey_conflux_provider_1 = require("@onekeyfe/onekey-conflux-provider");
10
10
  const onekey_tron_provider_1 = require("@onekeyfe/onekey-tron-provider");
11
11
  const onekey_cardano_provider_1 = require("@onekeyfe/onekey-cardano-provider");
12
- const onekey_private_external_account_provider_1 = require("@onekeyfe/onekey-private-external-account-provider");
12
+ // import { ProviderPrivateExternalAccount } from '@onekeyfe/onekey-private-external-account-provider';
13
13
  const onekey_cosmos_provider_1 = require("@onekeyfe/onekey-cosmos-provider");
14
14
  const onekey_polkadot_provider_1 = require("@onekeyfe/onekey-polkadot-provider");
15
15
  const cross_inpage_provider_core_1 = require("@onekeyfe/cross-inpage-provider-core");
@@ -36,9 +36,9 @@ function injectWeb3Provider() {
36
36
  const solana = new onekey_solana_provider_1.ProviderSolana({
37
37
  bridge,
38
38
  });
39
- const starcoin = new onekey_starcoin_provider_1.ProviderStarcoin({
40
- bridge,
41
- });
39
+ // const starcoin = new ProviderStarcoin({
40
+ // bridge,
41
+ // });
42
42
  const martian = new onekey_aptos_provider_1.ProviderAptosMartian({
43
43
  bridge,
44
44
  });
@@ -69,13 +69,14 @@ function injectWeb3Provider() {
69
69
  const btc = new onekey_btc_provider_1.ProviderBtc({ bridge });
70
70
  const btcWallet = new onekey_btc_provider_1.ProviderBtcWallet({ bridge });
71
71
  const algorand = new onekey_algo_provider_1.ProviderAlgo({ bridge });
72
- const $privateExternalAccount = new onekey_private_external_account_provider_1.ProviderPrivateExternalAccount({ bridge });
72
+ // const $privateExternalAccount = new ProviderPrivateExternalAccount({ bridge });
73
73
  // providerHub
74
74
  const $onekey = Object.assign(Object.assign({}, window.$onekey), { jsBridge: bridge, $private,
75
- $privateExternalAccount,
75
+ // $privateExternalAccount,
76
76
  ethereum,
77
- solana,
78
- starcoin, aptos: martian, conflux,
77
+ solana,
78
+ // starcoin,
79
+ aptos: martian, conflux,
79
80
  tron, sollet: null, sui,
80
81
  cardano,
81
82
  cosmos,
@@ -108,7 +109,7 @@ function injectWeb3Provider() {
108
109
  }
109
110
  (0, cross_inpage_provider_core_1.defineWindowProperty)('solana', solana);
110
111
  (0, cross_inpage_provider_core_1.defineWindowProperty)('phantom', { solana });
111
- (0, cross_inpage_provider_core_1.defineWindowProperty)('starcoin', starcoin);
112
+ // defineWindowProperty('starcoin', starcoin);
112
113
  (0, cross_inpage_provider_core_1.defineWindowProperty)('aptos', martian);
113
114
  (0, cross_inpage_provider_core_1.defineWindowProperty)('petra', martian, { enumerable: true });
114
115
  (0, cross_inpage_provider_core_1.defineWindowProperty)('martian', martianProxy, { enumerable: true });
@@ -13,7 +13,7 @@ import { findIconAndNameByName, findIconAndNameByIcon } from './findIconAndName'
13
13
  import { isWalletIconLessEqualThan, replaceIcon, } from './imgUtils';
14
14
  import { findIconAndNameInShadowRoot } from './shadowRoot';
15
15
  import { getConnectWalletModalByTitle, getMaxWithOfText, getWalletListByBtn, isClickable, isVisible, } from './utils';
16
- import { findWalletTextByParent, makeTextAlignCenter, makeTextAlignLeft, makeTextEllipse, makeTextWrap, replaceText, } from './textUtils';
16
+ import { findWalletTextByParent, makeTextAlignCenter, makeTextAlignLeft, makeTextEllipse, makeTextWordBreak, makeTextWrap, replaceText, } from './textUtils';
17
17
  import domUtils from '../utils/utilsDomNodes';
18
18
  export const basicWalletInfo = {
19
19
  [WALLET_NAMES.metamask]: {
@@ -578,7 +578,7 @@ export const sitesConfig = [
578
578
  },
579
579
  },
580
580
  {
581
- urls: ['bifrost.app'],
581
+ urls: ['bifrost.app', 'app.bifrost.io'],
582
582
  walletsForProvider: {
583
583
  [IInjectedProviderNames.ethereum]: [
584
584
  Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
@@ -736,6 +736,8 @@ export const sitesConfig = [
736
736
  const icon = (_b = (_a = modal === null || modal === void 0 ? void 0 : modal.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.querySelector('img[alt="walletconnect wallet logo"][src*="walletconnect.svg"]');
737
737
  return icon ? replaceIcon(icon, updatedIcon) : null;
738
738
  } }),
739
+ metamaskForRainbowKit,
740
+ walletConnectForRainbowKit,
739
741
  ],
740
742
  },
741
743
  },
@@ -774,6 +776,12 @@ export const sitesConfig = [
774
776
  [IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
775
777
  },
776
778
  },
779
+ {
780
+ urls: ['app.redacted.finance'],
781
+ walletsForProvider: {
782
+ [IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
783
+ },
784
+ },
777
785
  {
778
786
  urls: ['www.inverse.finance'],
779
787
  testPath: [':text("Enter App")', ':text("Connect")'],
@@ -1368,23 +1376,29 @@ export const sitesConfig = [
1368
1376
  ],
1369
1377
  },
1370
1378
  },
1371
- // {
1372
- // urls: ['stbt.matrixdock.com'],
1373
- // walletsForProvider: {
1374
- // [IInjectedProviderNames.ethereum]: [
1375
- // {
1376
- // ...basicWalletInfo['metamask'],
1377
- // findIconAndName({ name }) {
1378
- // const modal = getConnectWalletModalByTitle('div.inside', 'Connect Wallet');
1379
- // return (
1380
- // modal &&
1381
- // findIconAndNameDirectly('img[src*="metamask.png"]', 'auto-search-text', name, modal)
1382
- // );
1383
- // },
1384
- // },
1385
- // ],
1386
- // },
1387
- // },
1379
+ {
1380
+ urls: ['stbt.matrixdock.com', 'app.matrixdock.com'],
1381
+ walletsForProvider: {
1382
+ [IInjectedProviderNames.ethereum]: [
1383
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
1384
+ const modal = getConnectWalletModalByTitle('div.dialog-container', 'Available Wallets');
1385
+ return (modal &&
1386
+ findIconAndNameByIcon('img[src*="icon-metamask"]', 'auto-search-text', name, modal));
1387
+ },
1388
+ afterUpdate(textNode) {
1389
+ textNode.parentElement && makeTextWordBreak(textNode.parentElement);
1390
+ } }),
1391
+ Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
1392
+ const modal = getConnectWalletModalByTitle('div.dialog-container', 'Available Wallets');
1393
+ return (modal &&
1394
+ findIconAndNameByIcon('img[src*="icon-wallet-connect"]', 'auto-search-text', name, modal));
1395
+ },
1396
+ afterUpdate(textNode) {
1397
+ textNode.parentElement && makeTextWordBreak(textNode.parentElement);
1398
+ } }),
1399
+ ],
1400
+ },
1401
+ },
1388
1402
  {
1389
1403
  urls: ['spooky.fi'],
1390
1404
  walletsForProvider: {
@@ -2104,7 +2118,7 @@ export const sitesConfig = [
2104
2118
  },
2105
2119
  },
2106
2120
  {
2107
- urls: ['nftx.io'],
2121
+ urls: ['nftx.io', 'v3.nftx.io'],
2108
2122
  walletsForProvider: {
2109
2123
  [IInjectedProviderNames.ethereum]: [metamaskForRainbowKit],
2110
2124
  },
@@ -2376,7 +2390,6 @@ export const sitesConfig = [
2376
2390
  },
2377
2391
  {
2378
2392
  urls: ['keep3r.network'],
2379
- only: true,
2380
2393
  testPath: {
2381
2394
  desktop: [':text("Connect wallet")'],
2382
2395
  mobile: ['button.fixed.flex'],
@@ -2387,4 +2400,165 @@ export const sitesConfig = [
2387
2400
  ],
2388
2401
  },
2389
2402
  },
2403
+ {
2404
+ urls: ['ape.bond'],
2405
+ walletsForProvider: {
2406
+ [IInjectedProviderNames.ethereum]: [
2407
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '#wallet-connect-metamask' }),
2408
+ ],
2409
+ },
2410
+ },
2411
+ {
2412
+ urls: ['deri.io'],
2413
+ testUrls: ['deri.io/#/lite/trade/futures/BTCUSD'],
2414
+ constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
2415
+ walletsForProvider: {
2416
+ [IInjectedProviderNames.ethereum]: [
2417
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '.dialog.wallet-modal' }),
2418
+ ],
2419
+ },
2420
+ },
2421
+ {
2422
+ urls: ['bridge.wing.finance'],
2423
+ walletsForProvider: {
2424
+ [IInjectedProviderNames.ethereum]: [
2425
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '.bridge-list__content .wallet_type' }),
2426
+ ],
2427
+ },
2428
+ },
2429
+ {
2430
+ urls: ['helixapp.com'],
2431
+ testPath: [':text("Connect Wallet")', ':text("Confirm")'],
2432
+ walletsForProvider: {
2433
+ [IInjectedProviderNames.ethereum]: [
2434
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('.fixed.backdrop-filter .modal-container', 'Popular') }),
2435
+ ],
2436
+ [IInjectedProviderNames.cosmos]: [
2437
+ Object.assign(Object.assign({}, basicWalletInfo['keplr']), { container: () => getConnectWalletModalByTitle('.fixed.backdrop-filter .modal-container', 'Popular') }),
2438
+ ],
2439
+ // [IInjectedProviderNames.solana]: [
2440
+ // {
2441
+ // ...basicWalletInfo['phantom'],
2442
+ // container: () =>
2443
+ // getConnectWalletModalByTitle(
2444
+ // '.fixed.backdrop-filter .modal-container',
2445
+ // 'Other Wallets',
2446
+ // ),
2447
+ // },
2448
+ // ],
2449
+ },
2450
+ },
2451
+ {
2452
+ urls: ['app.ux.xyz'],
2453
+ testPath: ['button:has-text("Yes")', ':text("Connect")'],
2454
+ skip: { mobile: true },
2455
+ walletsForProvider: {
2456
+ [IInjectedProviderNames.cosmos]: [
2457
+ Object.assign(Object.assign({}, basicWalletInfo['keplr']), { name: /^Keplr Wallet$/, container: () => getConnectWalletModalByTitle('div.modal-layer', 'Connect Wallet') }),
2458
+ ],
2459
+ },
2460
+ },
2461
+ {
2462
+ urls: ['app-v2.acryptos.com'],
2463
+ skip: { mobile: true },
2464
+ walletsForProvider: {
2465
+ [IInjectedProviderNames.ethereum]: [
2466
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '#WEB3_CONNECT_MODAL_ID' }),
2467
+ ],
2468
+ },
2469
+ },
2470
+ {
2471
+ urls: ['fusionx.finance'],
2472
+ testUrls: ['fusionx.finance/swap'],
2473
+ walletsForProvider: {
2474
+ [IInjectedProviderNames.ethereum]: [
2475
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { name: /^Metamask$/, findIconAndName({ name }) {
2476
+ const modal = getConnectWalletModalByTitle('#portal-root div[role="dialog"]', 'Connect Wallet');
2477
+ return (modal &&
2478
+ findIconAndNameByIcon('img[src*="metamask"]', 'auto-search-text', name, modal));
2479
+ } }),
2480
+ ],
2481
+ },
2482
+ },
2483
+ {
2484
+ urls: ['app.optim.finance'],
2485
+ walletsForProvider: {
2486
+ [IInjectedProviderNames.cardano]: [
2487
+ Object.assign(Object.assign({}, basicWalletInfo['nami']), { findIconAndName({ name }) {
2488
+ const modal = getConnectWalletModalByTitle('div.backdrop-blur[class*="Modal"]', 'Select Wallet');
2489
+ return (modal &&
2490
+ findIconAndNameByIcon('img[src*="nami"][alt="Nami"]', 'auto-search-text', name, modal));
2491
+ } }),
2492
+ ],
2493
+ },
2494
+ },
2495
+ {
2496
+ urls: ['autofarm.network'],
2497
+ testPath: [':text("Wallet")'],
2498
+ walletsForProvider: {
2499
+ [IInjectedProviderNames.ethereum]: [
2500
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '.modal .outer-container div.wallets-container ', findIconAndName: ({ container, name }) => {
2501
+ return findIconAndNameInShadowRoot('onboard-v2', container, name);
2502
+ }, afterUpdate(textNode) {
2503
+ textNode.parentElement && makeTextAlignLeft(textNode.parentElement);
2504
+ } }),
2505
+ ],
2506
+ },
2507
+ },
2508
+ {
2509
+ urls: ['app.wingriders.com'],
2510
+ testPath: {
2511
+ desktop: [
2512
+ 'button:has-text("Got it")',
2513
+ 'button:has-text("I Agree")',
2514
+ ':text("Connect Wallet")',
2515
+ ],
2516
+ mobile: [
2517
+ 'button:has-text("Got it")',
2518
+ 'button:has-text("I Agree")',
2519
+ 'header button svg',
2520
+ ':text("Connect Wallet")',
2521
+ ],
2522
+ },
2523
+ walletsForProvider: {
2524
+ [IInjectedProviderNames.cardano]: [
2525
+ Object.assign(Object.assign({}, basicWalletInfo['nami']), { findIconAndName({ name }) {
2526
+ const modal = getConnectWalletModalByTitle('div.MuiDialog-container', 'Connect to WingRiders');
2527
+ return (modal &&
2528
+ findIconAndNameByIcon('img[src*="nami"][alt="Nami wallet"]', 'auto-search-text', name, modal));
2529
+ } }),
2530
+ ],
2531
+ },
2532
+ },
2533
+ {
2534
+ urls: ['app.vyfi.io'],
2535
+ walletsForProvider: {
2536
+ [IInjectedProviderNames.cardano]: [
2537
+ Object.assign(Object.assign({}, basicWalletInfo['nami']), { container: '#wallet-connect-nami' }),
2538
+ ],
2539
+ },
2540
+ },
2541
+ {
2542
+ urls: ['wemixonkroma.xyz'],
2543
+ walletsForProvider: {
2544
+ [IInjectedProviderNames.ethereum]: [
2545
+ Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '.wallet-modal-connect-button' }),
2546
+ ],
2547
+ },
2548
+ },
2549
+ {
2550
+ urls: ['app.arcade.xyz'],
2551
+ walletsForProvider: {
2552
+ [IInjectedProviderNames.ethereum]: [metamaskForRainbowKit],
2553
+ },
2554
+ },
2555
+ {
2556
+ urls: ['app.quarry.so'],
2557
+ testPath: [':text("Connect Wallet")', ':text("Continue")'],
2558
+ walletsForProvider: {
2559
+ [IInjectedProviderNames.solana]: [
2560
+ Object.assign(Object.assign({}, basicWalletInfo['phantom']), { container: () => getConnectWalletModalByTitle('.goki-walletkit-modal-wrapper', 'Select your wallet') }),
2561
+ ],
2562
+ },
2563
+ },
2390
2564
  ];
@@ -1,6 +1,7 @@
1
1
  import { ConstraintFn } from './type';
2
2
  export declare function makeTextEllipse(textNode: HTMLElement, option?: Partial<CSSStyleDeclaration>): void;
3
3
  export declare function makeTextWrap(textNode: HTMLElement): void;
4
+ export declare function makeTextWordBreak(textNode: HTMLElement): void;
4
5
  export declare function makeTextAlignLeft(textNode: HTMLElement): void;
5
6
  export declare function makeTextAlignCenter(textNode: HTMLElement): void;
6
7
  export declare function replaceText(textNode: Text, newText: string): Text;
@@ -9,6 +9,9 @@ export function makeTextEllipse(textNode, option = {}) {
9
9
  export function makeTextWrap(textNode) {
10
10
  textNode.style.whiteSpace = 'normal';
11
11
  }
12
+ export function makeTextWordBreak(textNode) {
13
+ textNode.style.wordBreak = 'break-word';
14
+ }
12
15
  export function makeTextAlignLeft(textNode) {
13
16
  textNode.style.textAlign = 'left';
14
17
  }
@@ -17,7 +17,6 @@ export type IWindowOneKeyHub = {
17
17
  phantom?: {
18
18
  solana?: ProviderSolana;
19
19
  };
20
- starcoin?: any;
21
20
  aptos?: ProviderAptos;
22
21
  petra?: ProviderAptos;
23
22
  martian?: ProviderAptosMartian;
@@ -1,12 +1,12 @@
1
1
  import { ProviderEthereum, shimWeb3, registerEIP6963Provider } from '@onekeyfe/onekey-eth-provider';
2
2
  import { ProviderPrivate } from '@onekeyfe/onekey-private-provider';
3
3
  import { ProviderSolana, registerSolanaWallet } from '@onekeyfe/onekey-solana-provider';
4
- import { ProviderStarcoin } from '@onekeyfe/onekey-starcoin-provider';
4
+ // import { ProviderStarcoin } from '@onekeyfe/onekey-starcoin-provider';
5
5
  import { ProviderAptosMartian } from '@onekeyfe/onekey-aptos-provider';
6
6
  import { ProviderConflux } from '@onekeyfe/onekey-conflux-provider';
7
7
  import { ProviderTron } from '@onekeyfe/onekey-tron-provider';
8
8
  import { ProviderCardano, defineWindowCardanoProperty } from '@onekeyfe/onekey-cardano-provider';
9
- import { ProviderPrivateExternalAccount } from '@onekeyfe/onekey-private-external-account-provider';
9
+ // import { ProviderPrivateExternalAccount } from '@onekeyfe/onekey-private-external-account-provider';
10
10
  import { ProviderCosmos } from '@onekeyfe/onekey-cosmos-provider';
11
11
  import { ProviderPolkadot, registerPolkadot } from '@onekeyfe/onekey-polkadot-provider';
12
12
  import { defineWindowProperty, checkWalletSwitchEnable, } from '@onekeyfe/cross-inpage-provider-core';
@@ -33,9 +33,9 @@ function injectWeb3Provider() {
33
33
  const solana = new ProviderSolana({
34
34
  bridge,
35
35
  });
36
- const starcoin = new ProviderStarcoin({
37
- bridge,
38
- });
36
+ // const starcoin = new ProviderStarcoin({
37
+ // bridge,
38
+ // });
39
39
  const martian = new ProviderAptosMartian({
40
40
  bridge,
41
41
  });
@@ -66,13 +66,14 @@ function injectWeb3Provider() {
66
66
  const btc = new ProviderBtc({ bridge });
67
67
  const btcWallet = new ProviderBtcWallet({ bridge });
68
68
  const algorand = new ProviderAlgo({ bridge });
69
- const $privateExternalAccount = new ProviderPrivateExternalAccount({ bridge });
69
+ // const $privateExternalAccount = new ProviderPrivateExternalAccount({ bridge });
70
70
  // providerHub
71
71
  const $onekey = Object.assign(Object.assign({}, window.$onekey), { jsBridge: bridge, $private,
72
- $privateExternalAccount,
72
+ // $privateExternalAccount,
73
73
  ethereum,
74
- solana,
75
- starcoin, aptos: martian, conflux,
74
+ solana,
75
+ // starcoin,
76
+ aptos: martian, conflux,
76
77
  tron, sollet: null, sui,
77
78
  cardano,
78
79
  cosmos,
@@ -105,7 +106,7 @@ function injectWeb3Provider() {
105
106
  }
106
107
  defineWindowProperty('solana', solana);
107
108
  defineWindowProperty('phantom', { solana });
108
- defineWindowProperty('starcoin', starcoin);
109
+ // defineWindowProperty('starcoin', starcoin);
109
110
  defineWindowProperty('aptos', martian);
110
111
  defineWindowProperty('petra', martian, { enumerable: true });
111
112
  defineWindowProperty('martian', martianProxy, { enumerable: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/inpage-providers-hub",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "keywords": [
5
5
  "cross-inpage-provider"
6
6
  ],
@@ -30,24 +30,23 @@
30
30
  "start": "tsc --watch"
31
31
  },
32
32
  "dependencies": {
33
- "@onekeyfe/cross-inpage-provider-core": "2.0.1",
34
- "@onekeyfe/cross-inpage-provider-types": "2.0.1",
35
- "@onekeyfe/onekey-algo-provider": "2.0.1",
36
- "@onekeyfe/onekey-aptos-provider": "2.0.1",
37
- "@onekeyfe/onekey-btc-provider": "2.0.1",
38
- "@onekeyfe/onekey-cardano-provider": "2.0.1",
39
- "@onekeyfe/onekey-conflux-provider": "2.0.1",
40
- "@onekeyfe/onekey-cosmos-provider": "2.0.1",
41
- "@onekeyfe/onekey-eth-provider": "2.0.1",
42
- "@onekeyfe/onekey-nostr-provider": "2.0.1",
43
- "@onekeyfe/onekey-polkadot-provider": "2.0.1",
44
- "@onekeyfe/onekey-private-external-account-provider": "2.0.1",
45
- "@onekeyfe/onekey-private-provider": "2.0.1",
46
- "@onekeyfe/onekey-solana-provider": "2.0.1",
47
- "@onekeyfe/onekey-starcoin-provider": "2.0.1",
48
- "@onekeyfe/onekey-sui-provider": "2.0.1",
49
- "@onekeyfe/onekey-tron-provider": "2.0.1",
50
- "@onekeyfe/onekey-webln-provider": "2.0.1",
33
+ "@onekeyfe/cross-inpage-provider-core": "2.0.3",
34
+ "@onekeyfe/cross-inpage-provider-types": "2.0.3",
35
+ "@onekeyfe/onekey-algo-provider": "2.0.3",
36
+ "@onekeyfe/onekey-aptos-provider": "2.0.3",
37
+ "@onekeyfe/onekey-btc-provider": "2.0.3",
38
+ "@onekeyfe/onekey-cardano-provider": "2.0.3",
39
+ "@onekeyfe/onekey-conflux-provider": "2.0.3",
40
+ "@onekeyfe/onekey-cosmos-provider": "2.0.3",
41
+ "@onekeyfe/onekey-eth-provider": "2.0.3",
42
+ "@onekeyfe/onekey-nostr-provider": "2.0.3",
43
+ "@onekeyfe/onekey-polkadot-provider": "2.0.3",
44
+ "@onekeyfe/onekey-private-external-account-provider": "2.0.3",
45
+ "@onekeyfe/onekey-private-provider": "2.0.3",
46
+ "@onekeyfe/onekey-solana-provider": "2.0.3",
47
+ "@onekeyfe/onekey-sui-provider": "2.0.3",
48
+ "@onekeyfe/onekey-tron-provider": "2.0.3",
49
+ "@onekeyfe/onekey-webln-provider": "2.0.3",
51
50
  "web3": "^1.7.3"
52
51
  },
53
52
  "devDependencies": {
@@ -55,5 +54,5 @@
55
54
  "@types/node": "^20.12.7",
56
55
  "playwright": "^1.43.1"
57
56
  },
58
- "gitHead": "762c20dff522f3bdd67cedcb97a5c49a97c5e3fa"
57
+ "gitHead": "8651d6b8832564a41c43d6a555068fa04b99bc8f"
59
58
  }