@onekeyfe/inpage-providers-hub 2.0.0 → 2.0.2
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.
- package/dist/cjs/connectButtonHack/universal/config.js +613 -178
- package/dist/cjs/connectButtonHack/universal/findIconAndName.js +26 -26
- package/dist/cjs/connectButtonHack/universal/imgUtils.js +11 -14
- package/dist/cjs/connectButtonHack/universal/index.js +1 -1
- package/dist/cjs/connectButtonHack/universal/shadowRoot.js +2 -2
- package/dist/cjs/connectButtonHack/universal/textUtils.js +13 -1
- package/dist/cjs/injectWeb3Provider.js +11 -10
- package/dist/connectButtonHack/universal/config.js +616 -181
- package/dist/connectButtonHack/universal/findIconAndName.d.ts +2 -2
- package/dist/connectButtonHack/universal/findIconAndName.js +24 -24
- package/dist/connectButtonHack/universal/imgUtils.d.ts +2 -1
- package/dist/connectButtonHack/universal/imgUtils.js +9 -13
- package/dist/connectButtonHack/universal/index.js +2 -2
- package/dist/connectButtonHack/universal/shadowRoot.js +4 -4
- package/dist/connectButtonHack/universal/textUtils.d.ts +3 -0
- package/dist/connectButtonHack/universal/textUtils.js +9 -0
- package/dist/injectWeb3Provider.d.ts +0 -1
- package/dist/injectWeb3Provider.js +11 -10
- package/package.json +20 -20
|
@@ -9,11 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { IInjectedProviderNames } from '@onekeyfe/cross-inpage-provider-types';
|
|
11
11
|
import { WALLET_CONNECT_INFO, WALLET_NAMES } from '../consts';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { findIconAndNameByName, findIconAndNameByIcon } from './findIconAndName';
|
|
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, 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]: {
|
|
@@ -54,7 +54,7 @@ export const basicWalletInfo = {
|
|
|
54
54
|
[WALLET_NAMES.keplr]: {
|
|
55
55
|
updatedIcon: WALLET_CONNECT_INFO.keplr.icon,
|
|
56
56
|
updatedName: WALLET_CONNECT_INFO.keplr.text,
|
|
57
|
-
name: /^(Keplr|Keplr Mobile)$/i,
|
|
57
|
+
name: /^(Keplr|Keplr Mobile|Keplr Wallet)$/i,
|
|
58
58
|
},
|
|
59
59
|
[WALLET_NAMES.polkadot]: {
|
|
60
60
|
updatedIcon: WALLET_CONNECT_INFO.polkadot.icon,
|
|
@@ -112,10 +112,10 @@ export const sitesConfig = [
|
|
|
112
112
|
walletsForProvider: {
|
|
113
113
|
[IInjectedProviderNames.ethereum]: [
|
|
114
114
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
115
|
-
return
|
|
115
|
+
return findIconAndNameByIcon('.button-option.MetaMask > svg', 'auto-search-text', name);
|
|
116
116
|
} }),
|
|
117
117
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
118
|
-
return
|
|
118
|
+
return findIconAndNameByIcon('.button-option.WalletConnect > svg', 'auto-search-text', name);
|
|
119
119
|
} }),
|
|
120
120
|
],
|
|
121
121
|
},
|
|
@@ -224,7 +224,7 @@ export const sitesConfig = [
|
|
|
224
224
|
walletsForProvider: {
|
|
225
225
|
[IInjectedProviderNames.ethereum]: [
|
|
226
226
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
227
|
-
return
|
|
227
|
+
return findIconAndNameByIcon('.bg-connect button[type="button"] img[src*="connect-walletConnect.svg"]', 'auto-search-text', name);
|
|
228
228
|
} }),
|
|
229
229
|
],
|
|
230
230
|
},
|
|
@@ -293,7 +293,7 @@ export const sitesConfig = [
|
|
|
293
293
|
urls: ['01.xyz'],
|
|
294
294
|
testPath: [':text("Connect")', ':text("Continue")'],
|
|
295
295
|
skip: {
|
|
296
|
-
mobile: true,
|
|
296
|
+
mobile: true,
|
|
297
297
|
},
|
|
298
298
|
walletsForProvider: {
|
|
299
299
|
[IInjectedProviderNames.solana]: [
|
|
@@ -318,10 +318,10 @@ export const sitesConfig = [
|
|
|
318
318
|
walletsForProvider: {
|
|
319
319
|
[IInjectedProviderNames.ethereum]: [
|
|
320
320
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
321
|
-
return
|
|
321
|
+
return findIconAndNameByIcon('.MuiPaper-root.MuiPaper-elevation a img[src*="icon-metamask"]', (icon) => { var _a; return (_a = icon.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; }, name);
|
|
322
322
|
} }),
|
|
323
323
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
324
|
-
return
|
|
324
|
+
return findIconAndNameByIcon('.MuiPaper-root.MuiPaper-elevation a img[src*="icon-walletconnect"]', (icon) => { var _a; return (_a = icon.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; }, name);
|
|
325
325
|
} }),
|
|
326
326
|
],
|
|
327
327
|
},
|
|
@@ -336,7 +336,7 @@ export const sitesConfig = [
|
|
|
336
336
|
],
|
|
337
337
|
[IInjectedProviderNames.btc]: [
|
|
338
338
|
Object.assign(Object.assign({}, basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
339
|
-
return
|
|
339
|
+
return findIconAndNameByIcon('.MuiStack-root button img[alt="Unisat"]', (icon) => { var _a, _b; return (_b = (_a = icon.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement; }, name);
|
|
340
340
|
} }),
|
|
341
341
|
],
|
|
342
342
|
},
|
|
@@ -482,7 +482,7 @@ export const sitesConfig = [
|
|
|
482
482
|
],
|
|
483
483
|
[IInjectedProviderNames.polkadot]: [
|
|
484
484
|
Object.assign(Object.assign({}, basicWalletInfo['polkadot']), { findIconAndName: ({ name }) => {
|
|
485
|
-
return
|
|
485
|
+
return findIconAndNameByIcon('.relative.rounded-2xl.text-default img[alt="Polkadotjs Logo"]', (icon) => icon.parentElement, name);
|
|
486
486
|
} }),
|
|
487
487
|
],
|
|
488
488
|
},
|
|
@@ -578,18 +578,18 @@ 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 }) {
|
|
585
585
|
const modal = getConnectWalletModalByTitle('div.chakra-modal__content-container', 'Connect Wallet');
|
|
586
586
|
return (modal &&
|
|
587
|
-
|
|
587
|
+
findIconAndNameByIcon('img[alt="MetaMask"]', (icon) => { var _a; return (_a = icon.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; }, name, modal));
|
|
588
588
|
} }),
|
|
589
589
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
590
590
|
const modal = getConnectWalletModalByTitle('div.chakra-modal__content-container', 'Connect Wallet');
|
|
591
591
|
return (modal &&
|
|
592
|
-
|
|
592
|
+
findIconAndNameByIcon('img[alt="WalletConnect"]', (icon) => { var _a; return (_a = icon.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; }, name, modal));
|
|
593
593
|
} }),
|
|
594
594
|
],
|
|
595
595
|
[IInjectedProviderNames.polkadot]: [
|
|
@@ -604,7 +604,7 @@ export const sitesConfig = [
|
|
|
604
604
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
605
605
|
const modal = getConnectWalletModalByTitle('[data-testid="connectModal"]', 'Connect Your Wallet');
|
|
606
606
|
return (modal &&
|
|
607
|
-
|
|
607
|
+
findIconAndNameByIcon('svg[aria-label="metamask-icon"]', 'auto-search-text', name, modal));
|
|
608
608
|
} }),
|
|
609
609
|
],
|
|
610
610
|
},
|
|
@@ -648,26 +648,15 @@ export const sitesConfig = [
|
|
|
648
648
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
649
649
|
const modal = getConnectWalletModalByTitle('div[data-testid="modal-container"]', 'Connect Wallet');
|
|
650
650
|
return (modal &&
|
|
651
|
-
|
|
652
|
-
},
|
|
653
|
-
afterUpdate(text, imgNode) {
|
|
654
|
-
imgNode.style.height = 'auto';
|
|
651
|
+
findIconAndNameByIcon('img[src*="assets/metamask"]', 'auto-search-text', name, modal));
|
|
655
652
|
} }),
|
|
656
653
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
657
|
-
var _a;
|
|
658
654
|
const modal = getConnectWalletModalByTitle('div[data-testid="modal-container"]', 'Connect Wallet');
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
icon && {
|
|
665
|
-
iconNode: icon,
|
|
666
|
-
textNode: text,
|
|
667
|
-
});
|
|
668
|
-
},
|
|
669
|
-
afterUpdate(text, imgNode) {
|
|
670
|
-
imgNode.style.height = 'auto';
|
|
655
|
+
return (modal &&
|
|
656
|
+
findIconAndNameByName(modal, name, 'auto-search-icon', {
|
|
657
|
+
text: [],
|
|
658
|
+
icon: [isWalletIconLessEqualThan],
|
|
659
|
+
}));
|
|
671
660
|
} }),
|
|
672
661
|
],
|
|
673
662
|
},
|
|
@@ -726,7 +715,7 @@ export const sitesConfig = [
|
|
|
726
715
|
});
|
|
727
716
|
} }),
|
|
728
717
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
729
|
-
return
|
|
718
|
+
return findIconAndNameByIcon('div.connectWalletModel img[src*="walletconnect"]', (e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; }, name);
|
|
730
719
|
} }),
|
|
731
720
|
],
|
|
732
721
|
},
|
|
@@ -747,6 +736,8 @@ export const sitesConfig = [
|
|
|
747
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"]');
|
|
748
737
|
return icon ? replaceIcon(icon, updatedIcon) : null;
|
|
749
738
|
} }),
|
|
739
|
+
metamaskForRainbowKit,
|
|
740
|
+
walletConnectForRainbowKit,
|
|
750
741
|
],
|
|
751
742
|
},
|
|
752
743
|
},
|
|
@@ -755,7 +746,7 @@ export const sitesConfig = [
|
|
|
755
746
|
walletsForProvider: {
|
|
756
747
|
[IInjectedProviderNames.ethereum]: [
|
|
757
748
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
758
|
-
return
|
|
749
|
+
return findIconAndNameByIcon('[id*="popover-body"] img[src*="metamask.svg"][alt="wallet logo"]', 'auto-search-text', wallet.name);
|
|
759
750
|
} }),
|
|
760
751
|
],
|
|
761
752
|
},
|
|
@@ -785,6 +776,12 @@ export const sitesConfig = [
|
|
|
785
776
|
[IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
|
|
786
777
|
},
|
|
787
778
|
},
|
|
779
|
+
{
|
|
780
|
+
urls: ['app.redacted.finance'],
|
|
781
|
+
walletsForProvider: {
|
|
782
|
+
[IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
|
|
783
|
+
},
|
|
784
|
+
},
|
|
788
785
|
{
|
|
789
786
|
urls: ['www.inverse.finance'],
|
|
790
787
|
testPath: [':text("Enter App")', ':text("Connect")'],
|
|
@@ -796,7 +793,7 @@ export const sitesConfig = [
|
|
|
796
793
|
walletsForProvider: {
|
|
797
794
|
[IInjectedProviderNames.ethereum]: [
|
|
798
795
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
799
|
-
return
|
|
796
|
+
return findIconAndNameByIcon(() => {
|
|
800
797
|
var _a;
|
|
801
798
|
return (_a = Array.from(document.querySelectorAll('section[id*="popover-content"] img[src*="Metamask.png"]')).filter((e) => isVisible(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
802
799
|
}, 'auto-search-text', wallet.name);
|
|
@@ -812,12 +809,12 @@ export const sitesConfig = [
|
|
|
812
809
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
813
810
|
const modal = getConnectWalletModalByTitle('div[id*="headlessui-dialog-panel"]', 'Connect a wallet');
|
|
814
811
|
return (modal &&
|
|
815
|
-
|
|
812
|
+
findIconAndNameByIcon('img[src*="metamask"]', 'auto-search-text', wallet.name, modal));
|
|
816
813
|
} }),
|
|
817
814
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName(wallet) {
|
|
818
815
|
const modal = getConnectWalletModalByTitle('div[id*="headlessui-dialog-panel"]', 'Connect a wallet');
|
|
819
816
|
return (modal &&
|
|
820
|
-
|
|
817
|
+
findIconAndNameByIcon('img[src*="walletconnect"]', 'auto-search-text', wallet.name, modal));
|
|
821
818
|
} }),
|
|
822
819
|
],
|
|
823
820
|
},
|
|
@@ -837,13 +834,12 @@ export const sitesConfig = [
|
|
|
837
834
|
[IInjectedProviderNames.ethereum]: [
|
|
838
835
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
839
836
|
const modal = getConnectWalletModalByTitle('#rlogin-connect-modal', 'Connect your wallet');
|
|
840
|
-
return (modal &&
|
|
841
|
-
findIconAndNameDirectly('img[alt="MetaMask"]', 'auto-search-text', name, modal));
|
|
837
|
+
return (modal && findIconAndNameByIcon('img[alt="MetaMask"]', 'auto-search-text', name, modal));
|
|
842
838
|
} }),
|
|
843
839
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
844
840
|
const modal = getConnectWalletModalByTitle('#rlogin-connect-modal', 'Connect your wallet');
|
|
845
841
|
return (modal &&
|
|
846
|
-
|
|
842
|
+
findIconAndNameByIcon('img[alt="WalletConnect"]', 'auto-search-text', name, modal));
|
|
847
843
|
} }),
|
|
848
844
|
],
|
|
849
845
|
},
|
|
@@ -867,12 +863,12 @@ export const sitesConfig = [
|
|
|
867
863
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
868
864
|
const modal = getConnectWalletModalByTitle('section.mantine-Modal-content', 'Connect Wallet');
|
|
869
865
|
return (modal &&
|
|
870
|
-
|
|
866
|
+
findIconAndNameByIcon('img[src*="metamask"]', (icon) => { var _a; return (_a = icon.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; }, wallet.name, modal));
|
|
871
867
|
} }),
|
|
872
868
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName(wallet) {
|
|
873
869
|
const modal = getConnectWalletModalByTitle('section.mantine-Modal-content', 'Connect Wallet');
|
|
874
870
|
return (modal &&
|
|
875
|
-
|
|
871
|
+
findIconAndNameByIcon('img[src*="walletConnect"]', (icon) => { var _a; return (_a = icon.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; }, wallet.name, modal));
|
|
876
872
|
} }),
|
|
877
873
|
],
|
|
878
874
|
},
|
|
@@ -898,12 +894,12 @@ export const sitesConfig = [
|
|
|
898
894
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
899
895
|
const modal = getConnectWalletModalByTitle('div.ant-modal-content', 'Select a wallet');
|
|
900
896
|
return (modal &&
|
|
901
|
-
|
|
897
|
+
findIconAndNameByIcon('img[src*="metamask"]', 'auto-search-text', wallet.name, modal));
|
|
902
898
|
} }),
|
|
903
899
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
904
900
|
const modal = getConnectWalletModalByTitle('div.ant-modal-content', 'Select a wallet');
|
|
905
901
|
return (modal &&
|
|
906
|
-
|
|
902
|
+
findIconAndNameByIcon('img[src*="wallet-connect.svg"]', 'auto-search-text', name, modal));
|
|
907
903
|
} }),
|
|
908
904
|
],
|
|
909
905
|
},
|
|
@@ -916,12 +912,12 @@ export const sitesConfig = [
|
|
|
916
912
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
917
913
|
const modal = getConnectWalletModalByTitle('div.chakra-modal__content-container', 'Select a wallet');
|
|
918
914
|
return (modal &&
|
|
919
|
-
|
|
915
|
+
findIconAndNameByIcon('img[alt="MetaMask"]', 'auto-search-text', wallet.name, modal));
|
|
920
916
|
} }),
|
|
921
917
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
922
918
|
const modal = getConnectWalletModalByTitle('div.chakra-modal__content-container', 'Select a wallet');
|
|
923
919
|
return (modal &&
|
|
924
|
-
|
|
920
|
+
findIconAndNameByIcon('img[alt="WalletConnect"]', 'auto-search-text', name, modal));
|
|
925
921
|
} }),
|
|
926
922
|
],
|
|
927
923
|
},
|
|
@@ -999,12 +995,12 @@ export const sitesConfig = [
|
|
|
999
995
|
walletsForProvider: {
|
|
1000
996
|
[IInjectedProviderNames.ethereum]: [
|
|
1001
997
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1002
|
-
return
|
|
998
|
+
return findIconAndNameByIcon('img[src*="metamask"][alt="Metamask"]', 'auto-search-text', name);
|
|
1003
999
|
} }),
|
|
1004
1000
|
],
|
|
1005
1001
|
[IInjectedProviderNames.cosmos]: [
|
|
1006
1002
|
Object.assign(Object.assign({}, basicWalletInfo['keplr']), { findIconAndName({ name }) {
|
|
1007
|
-
return
|
|
1003
|
+
return findIconAndNameByIcon('img[src*="keplr"][alt="Keplr"]', 'auto-search-text', name);
|
|
1008
1004
|
} }),
|
|
1009
1005
|
],
|
|
1010
1006
|
},
|
|
@@ -1030,10 +1026,10 @@ export const sitesConfig = [
|
|
|
1030
1026
|
walletsForProvider: {
|
|
1031
1027
|
[IInjectedProviderNames.ethereum]: [
|
|
1032
1028
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1033
|
-
return
|
|
1029
|
+
return findIconAndNameByIcon('img[alt="Metamask Logo"][title="Metamask"]', 'auto-search-text', name);
|
|
1034
1030
|
} }),
|
|
1035
1031
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
1036
|
-
return
|
|
1032
|
+
return findIconAndNameByIcon('img[alt="WalletConnect Logo"][title="WalletConnect"]', 'auto-search-text', name);
|
|
1037
1033
|
} }),
|
|
1038
1034
|
],
|
|
1039
1035
|
},
|
|
@@ -1054,7 +1050,7 @@ export const sitesConfig = [
|
|
|
1054
1050
|
},
|
|
1055
1051
|
{
|
|
1056
1052
|
urls: ['app.wagmi.com'],
|
|
1057
|
-
constraintMap: { icon: [
|
|
1053
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
1058
1054
|
walletsForProvider: {
|
|
1059
1055
|
[IInjectedProviderNames.ethereum]: [
|
|
1060
1056
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '#wallet-dropdown-scroll-wrapper' }),
|
|
@@ -1072,7 +1068,7 @@ export const sitesConfig = [
|
|
|
1072
1068
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1073
1069
|
const modal = getConnectWalletModalByTitle('#headlessui-portal-root', 'Connect your Wallet');
|
|
1074
1070
|
return (modal &&
|
|
1075
|
-
|
|
1071
|
+
findIconAndNameByIcon('img[src*="metamask.svg"][alt="MetaMask"]', 'auto-search-text', name, modal));
|
|
1076
1072
|
} }),
|
|
1077
1073
|
],
|
|
1078
1074
|
},
|
|
@@ -1102,7 +1098,7 @@ export const sitesConfig = [
|
|
|
1102
1098
|
},
|
|
1103
1099
|
{
|
|
1104
1100
|
urls: ['rosswap.com'],
|
|
1105
|
-
constraintMap: { icon: [
|
|
1101
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
1106
1102
|
skip: {
|
|
1107
1103
|
mobile: true, //no connect wallet modal
|
|
1108
1104
|
},
|
|
@@ -1115,7 +1111,7 @@ export const sitesConfig = [
|
|
|
1115
1111
|
},
|
|
1116
1112
|
{
|
|
1117
1113
|
urls: ['maiadao.io'],
|
|
1118
|
-
constraintMap: { icon: [
|
|
1114
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
1119
1115
|
skip: {
|
|
1120
1116
|
mobile: true, //no connect wallet modal
|
|
1121
1117
|
},
|
|
@@ -1148,58 +1144,10 @@ export const sitesConfig = [
|
|
|
1148
1144
|
},
|
|
1149
1145
|
{
|
|
1150
1146
|
urls: ['www.staderlabs.com'],
|
|
1151
|
-
skip: {
|
|
1152
|
-
mobile: true, //tmp skip for lack walletconnet
|
|
1153
|
-
},
|
|
1154
1147
|
testUrls: ['www.staderlabs.com/eth/stake/'],
|
|
1155
|
-
constraintMap: { icon: [
|
|
1148
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
1156
1149
|
walletsForProvider: {
|
|
1157
|
-
[IInjectedProviderNames.ethereum]: [
|
|
1158
|
-
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1159
|
-
const modal = getConnectWalletModalByTitle('.chakra-modal__content-container', 'Select wallet') ||
|
|
1160
|
-
getConnectWalletModalByTitle('#__CONNECTKIT__', 'Connect Wallet');
|
|
1161
|
-
if (!modal) {
|
|
1162
|
-
return null;
|
|
1163
|
-
}
|
|
1164
|
-
return (findIconAndNameByParent(modal, name, {
|
|
1165
|
-
text: [],
|
|
1166
|
-
icon: [],
|
|
1167
|
-
}) ||
|
|
1168
|
-
findIconAndNameDirectly('img[src*="media/mm"][alt="metaMask Logo"]', 'auto-search-text', name, modal, { text: [], icon: [] }, 5));
|
|
1169
|
-
},
|
|
1170
|
-
afterUpdate(text, icon) {
|
|
1171
|
-
var _a;
|
|
1172
|
-
const parent = (_a = text.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
1173
|
-
makeTextWrap(text.parentElement);
|
|
1174
|
-
const imgContainer = parent === null || parent === void 0 ? void 0 : parent.firstChild;
|
|
1175
|
-
if (parent && imgContainer) {
|
|
1176
|
-
imgContainer.style.display = 'flex';
|
|
1177
|
-
imgContainer.style.alignItems = 'center';
|
|
1178
|
-
imgContainer.style.borderRadius = '0';
|
|
1179
|
-
imgContainer.style.flexShrink = '0';
|
|
1180
|
-
}
|
|
1181
|
-
} }),
|
|
1182
|
-
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
1183
|
-
const modal = getConnectWalletModalByTitle('.chakra-modal__content-container', 'Select wallet') ||
|
|
1184
|
-
getConnectWalletModalByTitle('#__CONNECTKIT__', 'Connect Wallet');
|
|
1185
|
-
if (!modal) {
|
|
1186
|
-
return null;
|
|
1187
|
-
}
|
|
1188
|
-
return findIconAndNameDirectly('img[alt="walletConnect Logo"]', 'auto-search-text', name, modal, { text: [], icon: [] }, 5);
|
|
1189
|
-
},
|
|
1190
|
-
afterUpdate(text, icon) {
|
|
1191
|
-
var _a;
|
|
1192
|
-
const parent = (_a = text.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
1193
|
-
makeTextWrap(text.parentElement);
|
|
1194
|
-
const imgContainer = parent === null || parent === void 0 ? void 0 : parent.firstChild;
|
|
1195
|
-
if (parent && imgContainer) {
|
|
1196
|
-
imgContainer.style.display = 'flex';
|
|
1197
|
-
imgContainer.style.alignItems = 'center';
|
|
1198
|
-
imgContainer.style.borderRadius = '0';
|
|
1199
|
-
imgContainer.style.flexShrink = '0';
|
|
1200
|
-
}
|
|
1201
|
-
}, skip: { mobile: true } }),
|
|
1202
|
-
],
|
|
1150
|
+
[IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
|
|
1203
1151
|
},
|
|
1204
1152
|
},
|
|
1205
1153
|
{
|
|
@@ -1208,7 +1156,7 @@ export const sitesConfig = [
|
|
|
1208
1156
|
testUrls: ['stake.solblaze.org/app'],
|
|
1209
1157
|
walletsForProvider: {
|
|
1210
1158
|
[IInjectedProviderNames.solana]: [
|
|
1211
|
-
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { container: '#connect_modal', afterUpdate(text
|
|
1159
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { container: '#connect_modal', afterUpdate(text) {
|
|
1212
1160
|
var _a;
|
|
1213
1161
|
if ((_a = text.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) {
|
|
1214
1162
|
text.parentElement.parentElement.style.whiteSpace = 'noWrap';
|
|
@@ -1220,7 +1168,6 @@ export const sitesConfig = [
|
|
|
1220
1168
|
},
|
|
1221
1169
|
{
|
|
1222
1170
|
urls: ['buzz.bsquared.network'],
|
|
1223
|
-
skip: true,
|
|
1224
1171
|
walletsForProvider: {
|
|
1225
1172
|
[IInjectedProviderNames.ethereum]: [
|
|
1226
1173
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('.modalContent', 'Connect Wallet') }),
|
|
@@ -1229,7 +1176,7 @@ export const sitesConfig = [
|
|
|
1229
1176
|
Object.assign(Object.assign({}, basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
1230
1177
|
const modal = getConnectWalletModalByTitle('.modalContent', 'Connect Wallet');
|
|
1231
1178
|
return (modal &&
|
|
1232
|
-
|
|
1179
|
+
findIconAndNameByIcon('img[src*="layout/unisat.png"]', 'auto-search-text', name));
|
|
1233
1180
|
} }),
|
|
1234
1181
|
],
|
|
1235
1182
|
},
|
|
@@ -1295,7 +1242,7 @@ export const sitesConfig = [
|
|
|
1295
1242
|
//mobile version is redirected to app-mobile.ariesmarkets.xyz. check next item
|
|
1296
1243
|
urls: ['app.ariesmarkets.xyz'],
|
|
1297
1244
|
testUrls: ['app.ariesmarkets.xyz/lending'],
|
|
1298
|
-
constraintMap: { icon: [
|
|
1245
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
1299
1246
|
walletsForProvider: {
|
|
1300
1247
|
[IInjectedProviderNames.aptos]: [
|
|
1301
1248
|
Object.assign(Object.assign({}, basicWalletInfo['petra']), { container: () => getConnectWalletModalByTitle('div.mantine-Paper-root', 'Select Wallet') }),
|
|
@@ -1304,7 +1251,7 @@ export const sitesConfig = [
|
|
|
1304
1251
|
},
|
|
1305
1252
|
{
|
|
1306
1253
|
urls: ['app-mobile.ariesmarkets.xyz'],
|
|
1307
|
-
constraintMap: { icon: [
|
|
1254
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
1308
1255
|
walletsForProvider: {
|
|
1309
1256
|
[IInjectedProviderNames.aptos]: [
|
|
1310
1257
|
Object.assign(Object.assign({}, basicWalletInfo['petra']), { findIconAndName({ name }) {
|
|
@@ -1356,7 +1303,7 @@ export const sitesConfig = [
|
|
|
1356
1303
|
Object.assign(Object.assign({}, basicWalletInfo['nami']), { findIconAndName({ name }) {
|
|
1357
1304
|
const modal = getConnectWalletModalByTitle('div.dialog-connect-wallet', 'Connect wallet');
|
|
1358
1305
|
return (modal &&
|
|
1359
|
-
|
|
1306
|
+
findIconAndNameByIcon('img[src*="nami.svg"][alt="Nami"]', 'auto-search-text', name, modal, { text: [], icon: [] }, 6));
|
|
1360
1307
|
} }),
|
|
1361
1308
|
],
|
|
1362
1309
|
},
|
|
@@ -1371,12 +1318,12 @@ export const sitesConfig = [
|
|
|
1371
1318
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1372
1319
|
const modal = getConnectWalletModalByTitle('#portal-root', 'Connect Wallet');
|
|
1373
1320
|
return (modal &&
|
|
1374
|
-
|
|
1321
|
+
findIconAndNameByIcon('img[src*="wallets/metamask.png"]', 'auto-search-text', name, modal, { text: [], icon: [] }, 5));
|
|
1375
1322
|
} }),
|
|
1376
1323
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
1377
1324
|
const modal = getConnectWalletModalByTitle('#portal-root', 'Connect Wallet');
|
|
1378
1325
|
return (modal &&
|
|
1379
|
-
|
|
1326
|
+
findIconAndNameByIcon('img[src*="wallets/walletconnect.png"]', 'auto-search-text', name, modal, { text: [], icon: [] }, 5));
|
|
1380
1327
|
} }),
|
|
1381
1328
|
],
|
|
1382
1329
|
},
|
|
@@ -1401,7 +1348,7 @@ export const sitesConfig = [
|
|
|
1401
1348
|
const modal = getConnectWalletModalByTitle('div.inside', 'Connect Wallet') ||
|
|
1402
1349
|
getConnectWalletModalByTitle('div[role="dialog"]', 'Start by connecting with one');
|
|
1403
1350
|
return (modal &&
|
|
1404
|
-
|
|
1351
|
+
findIconAndNameByIcon('img[src*="metamask.png"]', 'auto-search-text', name, modal));
|
|
1405
1352
|
} }),
|
|
1406
1353
|
],
|
|
1407
1354
|
},
|
|
@@ -1419,33 +1366,39 @@ export const sitesConfig = [
|
|
|
1419
1366
|
Object.assign(Object.assign({}, basicWalletInfo['petra']), { findIconAndName({ name }) {
|
|
1420
1367
|
const modal = getConnectWalletModalByTitle('div.p-dialog', 'Connect a Wallet');
|
|
1421
1368
|
return (modal &&
|
|
1422
|
-
|
|
1369
|
+
findIconAndNameByIcon('img[alt="Petra Wallet"]', 'auto-search-text', name, modal));
|
|
1423
1370
|
} }),
|
|
1424
1371
|
Object.assign(Object.assign({}, basicWalletInfo['martian']), { findIconAndName({ name }) {
|
|
1425
1372
|
const modal = getConnectWalletModalByTitle('div.p-dialog', 'Connect a Wallet');
|
|
1426
1373
|
return (modal &&
|
|
1427
|
-
|
|
1374
|
+
findIconAndNameByIcon('img[alt="Martian Wallet"]', 'auto-search-text', name, modal));
|
|
1375
|
+
} }),
|
|
1376
|
+
],
|
|
1377
|
+
},
|
|
1378
|
+
},
|
|
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);
|
|
1428
1398
|
} }),
|
|
1429
1399
|
],
|
|
1430
1400
|
},
|
|
1431
1401
|
},
|
|
1432
|
-
// {
|
|
1433
|
-
// urls: ['stbt.matrixdock.com'],
|
|
1434
|
-
// walletsForProvider: {
|
|
1435
|
-
// [IInjectedProviderNames.ethereum]: [
|
|
1436
|
-
// {
|
|
1437
|
-
// ...basicWalletInfo['metamask'],
|
|
1438
|
-
// findIconAndName({ name }) {
|
|
1439
|
-
// const modal = getConnectWalletModalByTitle('div.inside', 'Connect Wallet');
|
|
1440
|
-
// return (
|
|
1441
|
-
// modal &&
|
|
1442
|
-
// findIconAndNameDirectly('img[src*="metamask.png"]', 'auto-search-text', name, modal)
|
|
1443
|
-
// );
|
|
1444
|
-
// },
|
|
1445
|
-
// },
|
|
1446
|
-
// ],
|
|
1447
|
-
// },
|
|
1448
|
-
// },
|
|
1449
1402
|
{
|
|
1450
1403
|
urls: ['spooky.fi'],
|
|
1451
1404
|
walletsForProvider: {
|
|
@@ -1468,7 +1421,7 @@ export const sitesConfig = [
|
|
|
1468
1421
|
}
|
|
1469
1422
|
const parent = shadowRoot.querySelector('div.wallet-list__container');
|
|
1470
1423
|
return (parent &&
|
|
1471
|
-
|
|
1424
|
+
findIconAndNameByIcon('img[data-testid="wallet-icon-metamask"]', 'auto-search-text', name, parent));
|
|
1472
1425
|
} }),
|
|
1473
1426
|
],
|
|
1474
1427
|
},
|
|
@@ -1484,7 +1437,7 @@ export const sitesConfig = [
|
|
|
1484
1437
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1485
1438
|
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect wallet');
|
|
1486
1439
|
return (modal &&
|
|
1487
|
-
|
|
1440
|
+
findIconAndNameByIcon('img[src*="metamask.svg"][alt="MetaMask icon"]', 'auto-search-text', name, modal));
|
|
1488
1441
|
} }),
|
|
1489
1442
|
],
|
|
1490
1443
|
},
|
|
@@ -1496,7 +1449,7 @@ export const sitesConfig = [
|
|
|
1496
1449
|
Object.assign(Object.assign({}, basicWalletInfo['polkadot']), { findIconAndName() {
|
|
1497
1450
|
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect Wallet');
|
|
1498
1451
|
return (modal &&
|
|
1499
|
-
|
|
1452
|
+
findIconAndNameByIcon('img[alt="Polkadotjs Logo"]', 'auto-search-text', /^Polkadot/, modal));
|
|
1500
1453
|
} }),
|
|
1501
1454
|
],
|
|
1502
1455
|
},
|
|
@@ -1568,7 +1521,7 @@ export const sitesConfig = [
|
|
|
1568
1521
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1569
1522
|
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect Wallet');
|
|
1570
1523
|
return (modal &&
|
|
1571
|
-
|
|
1524
|
+
findIconAndNameByIcon('img[src*="metamask.svg"][alt="Metamask"]', 'auto-search-text', name, modal));
|
|
1572
1525
|
},
|
|
1573
1526
|
afterUpdate(textNode, icon) {
|
|
1574
1527
|
icon.style.marginRight = '12px';
|
|
@@ -1578,7 +1531,7 @@ export const sitesConfig = [
|
|
|
1578
1531
|
Object.assign(Object.assign({}, basicWalletInfo['keplr']), { findIconAndName({ name }) {
|
|
1579
1532
|
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect Wallet');
|
|
1580
1533
|
return (modal &&
|
|
1581
|
-
|
|
1534
|
+
findIconAndNameByIcon('img[src*="keplr.svg"][alt="Keplr"]', 'auto-search-text', name, modal));
|
|
1582
1535
|
},
|
|
1583
1536
|
afterUpdate(textNode, icon) {
|
|
1584
1537
|
icon.style.marginRight = '12px';
|
|
@@ -1601,12 +1554,12 @@ export const sitesConfig = [
|
|
|
1601
1554
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
1602
1555
|
const modal = getConnectWalletModalByTitle('#headlessui-portal-root div[role="dialog"]', 'Choose Network');
|
|
1603
1556
|
return (modal &&
|
|
1604
|
-
|
|
1557
|
+
findIconAndNameByIcon('img[src*="metamask"][alt="MetaMask logo"]', 'auto-search-text', wallet.name, modal));
|
|
1605
1558
|
} }),
|
|
1606
1559
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName(wallet) {
|
|
1607
1560
|
const modal = getConnectWalletModalByTitle('#headlessui-portal-root div[role="dialog"]', 'Choose Network');
|
|
1608
1561
|
return (modal &&
|
|
1609
|
-
|
|
1562
|
+
findIconAndNameByIcon('img[src*="wallet_connect"][alt="WalletConnect logo"]', 'auto-search-text', wallet.name, modal));
|
|
1610
1563
|
} }),
|
|
1611
1564
|
],
|
|
1612
1565
|
},
|
|
@@ -1639,8 +1592,7 @@ export const sitesConfig = [
|
|
|
1639
1592
|
[IInjectedProviderNames.ethereum]: [
|
|
1640
1593
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1641
1594
|
const modal = getConnectWalletModalByTitle('.chakra-portal div.chakra-modal__content-container', 'Please select your wallet:');
|
|
1642
|
-
return (modal &&
|
|
1643
|
-
findIconAndNameDirectly('img[alt="MetaMask"]', 'auto-search-text', name, modal));
|
|
1595
|
+
return (modal && findIconAndNameByIcon('img[alt="MetaMask"]', 'auto-search-text', name, modal));
|
|
1644
1596
|
} }),
|
|
1645
1597
|
],
|
|
1646
1598
|
},
|
|
@@ -1657,12 +1609,12 @@ export const sitesConfig = [
|
|
|
1657
1609
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1658
1610
|
const modal = getConnectWalletModalByTitle('div.connect-options', 'Select Wallet');
|
|
1659
1611
|
return (modal &&
|
|
1660
|
-
|
|
1612
|
+
findIconAndNameByIcon('img.logo[alt="MetaMask"]', 'auto-search-text', name, modal));
|
|
1661
1613
|
} }),
|
|
1662
1614
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
1663
1615
|
const modal = getConnectWalletModalByTitle('div.connect-options', 'Select Wallet');
|
|
1664
1616
|
return (modal &&
|
|
1665
|
-
|
|
1617
|
+
findIconAndNameByIcon('img.logo[alt="WalletConnect"]', 'auto-search-text', name, modal));
|
|
1666
1618
|
} }),
|
|
1667
1619
|
],
|
|
1668
1620
|
},
|
|
@@ -1677,7 +1629,7 @@ export const sitesConfig = [
|
|
|
1677
1629
|
.filter(Boolean);
|
|
1678
1630
|
const modal = modals === null || modals === void 0 ? void 0 : modals[modals.length - 1];
|
|
1679
1631
|
return modal
|
|
1680
|
-
?
|
|
1632
|
+
? findIconAndNameByIcon('img[src*="wallet-MetaMask"]', 'auto-search-text', name, modal)
|
|
1681
1633
|
: null;
|
|
1682
1634
|
} }),
|
|
1683
1635
|
],
|
|
@@ -1695,7 +1647,7 @@ export const sitesConfig = [
|
|
|
1695
1647
|
desktop: ['.proceed-cta-checkbox input', 'button:text("Proceed")', ':text("Connect Wallet")'],
|
|
1696
1648
|
},
|
|
1697
1649
|
skip: { mobile: true },
|
|
1698
|
-
constraintMap: { icon: [
|
|
1650
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
1699
1651
|
walletsForProvider: {
|
|
1700
1652
|
[IInjectedProviderNames.ethereum]: [
|
|
1701
1653
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('div.modal-connect-wallet', 'Connect Wallet') }),
|
|
@@ -1754,13 +1706,13 @@ export const sitesConfig = [
|
|
|
1754
1706
|
findIconAndName({ name }) {
|
|
1755
1707
|
const modal = document.querySelector('div[role="presentation"].MuiModal-root');
|
|
1756
1708
|
return modal
|
|
1757
|
-
?
|
|
1709
|
+
? findIconAndNameByIcon('img[src*="static/media/1.eb7cbbcbf"]', 'auto-search-text', name, modal)
|
|
1758
1710
|
: null;
|
|
1759
1711
|
} }),
|
|
1760
1712
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
1761
1713
|
const modal = document.querySelector('div[role="presentation"].MuiModal-root');
|
|
1762
1714
|
return modal
|
|
1763
|
-
?
|
|
1715
|
+
? findIconAndNameByIcon('img[src*="static/media/2.cb9826961cbcd25676"]', 'auto-search-text', name, modal)
|
|
1764
1716
|
: null;
|
|
1765
1717
|
} }),
|
|
1766
1718
|
],
|
|
@@ -1871,7 +1823,7 @@ export const sitesConfig = [
|
|
|
1871
1823
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
1872
1824
|
const modal = getConnectWalletModalByTitle('section.chakra-modal__content[role="dialog"]', 'Connect to a wallet');
|
|
1873
1825
|
return (modal &&
|
|
1874
|
-
|
|
1826
|
+
findIconAndNameByIcon('img[src*="metamask-icon"][alt="Icon"]', 'auto-search-text', name, modal));
|
|
1875
1827
|
},
|
|
1876
1828
|
afterUpdate(textNode, iconNode) {
|
|
1877
1829
|
iconNode.style.aspectRatio = '1';
|
|
@@ -1880,7 +1832,7 @@ export const sitesConfig = [
|
|
|
1880
1832
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName({ name }) {
|
|
1881
1833
|
const modal = getConnectWalletModalByTitle('section.chakra-modal__content[role="dialog"]', 'Connect to a wallet');
|
|
1882
1834
|
return (modal &&
|
|
1883
|
-
|
|
1835
|
+
findIconAndNameByIcon('img[src*="wallet-connect-icon"][alt="Icon"]', 'auto-search-text', name, modal));
|
|
1884
1836
|
},
|
|
1885
1837
|
afterUpdate(textNode, iconNode) {
|
|
1886
1838
|
iconNode.style.aspectRatio = '1';
|
|
@@ -1944,44 +1896,24 @@ export const sitesConfig = [
|
|
|
1944
1896
|
[IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
|
|
1945
1897
|
},
|
|
1946
1898
|
},
|
|
1947
|
-
// {
|
|
1948
|
-
// urls: ['app.wombat.exchange'],
|
|
1949
|
-
// testPath: [':text("Click here to")', ':text("Accept")', ':text("Connect Wallet")'],
|
|
1950
|
-
// walletsForProvider: {
|
|
1951
|
-
// [IInjectedProviderNames.ethereum]: [
|
|
1952
|
-
// {
|
|
1953
|
-
// ...basicWalletInfo['metamask'],
|
|
1954
|
-
// container: '#select-wallet-MetaMask',
|
|
1955
|
-
// },
|
|
1956
|
-
// {
|
|
1957
|
-
// ...basicWalletInfo['walletconnect'],
|
|
1958
|
-
// container: '[id="select-wallet-Wallet Connect"]',
|
|
1959
|
-
// },
|
|
1960
|
-
// ],
|
|
1961
|
-
// },
|
|
1962
|
-
// },
|
|
1963
1899
|
{
|
|
1964
1900
|
urls: ['hmx.org'],
|
|
1965
1901
|
testUrls: ['hmx.org/blast/trade/eth-usd'],
|
|
1966
1902
|
testPath: {
|
|
1967
|
-
desktop: [
|
|
1968
|
-
|
|
1969
|
-
':text("Accept & Continue")',
|
|
1970
|
-
':text("Connect Wallet")',
|
|
1971
|
-
],
|
|
1972
|
-
mobile: [':text("Continue on a ")', ':text("Accept & Continue")', ':text("Connect Wallet")'],
|
|
1903
|
+
desktop: ['button:has-text("Accept & Continue")', ':text("Connect Wallet")'],
|
|
1904
|
+
mobile: ['button:has-text("Accept & Continue")', ':text("Connect Wallet")'],
|
|
1973
1905
|
},
|
|
1974
1906
|
walletsForProvider: {
|
|
1975
1907
|
[IInjectedProviderNames.ethereum]: [
|
|
1976
1908
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
1977
1909
|
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect Wallet');
|
|
1978
1910
|
return (modal &&
|
|
1979
|
-
|
|
1911
|
+
findIconAndNameByIcon('img[src*="metamask"][alt="MetaMask"]', 'auto-search-text', wallet.name, modal));
|
|
1980
1912
|
} }),
|
|
1981
1913
|
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { findIconAndName(wallet) {
|
|
1982
1914
|
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect Wallet');
|
|
1983
1915
|
return (modal &&
|
|
1984
|
-
|
|
1916
|
+
findIconAndNameByIcon('img[src*="wallet-connect"][alt="Wallet Connect"]', 'auto-search-text', wallet.name, modal));
|
|
1985
1917
|
} }),
|
|
1986
1918
|
],
|
|
1987
1919
|
},
|
|
@@ -2002,7 +1934,7 @@ export const sitesConfig = [
|
|
|
2002
1934
|
},
|
|
2003
1935
|
{
|
|
2004
1936
|
urls: ['app.vesper.finance'],
|
|
2005
|
-
constraintMap: { icon: [
|
|
1937
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
2006
1938
|
walletsForProvider: {
|
|
2007
1939
|
[IInjectedProviderNames.ethereum]: [
|
|
2008
1940
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('div.fixed div.rounded-lg', 'Connect Wallet') }),
|
|
@@ -2020,7 +1952,7 @@ export const sitesConfig = [
|
|
|
2020
1952
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
2021
1953
|
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect Wallet');
|
|
2022
1954
|
return (modal &&
|
|
2023
|
-
|
|
1955
|
+
findIconAndNameByIcon('img[src*="metamask"][alt="MetaMask"]', 'auto-search-text', wallet.name, modal));
|
|
2024
1956
|
} }),
|
|
2025
1957
|
],
|
|
2026
1958
|
},
|
|
@@ -2043,17 +1975,20 @@ export const sitesConfig = [
|
|
|
2043
1975
|
skip: { mobile: true },
|
|
2044
1976
|
walletsForProvider: {
|
|
2045
1977
|
[IInjectedProviderNames.ethereum]: [
|
|
2046
|
-
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('div[role="dialog"]', 'Connect wallet to continue'), afterUpdate(textNode
|
|
2047
|
-
textNode.parentElement && (textNode.parentElement
|
|
1978
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('div[role="dialog"]', 'Connect wallet to continue'), afterUpdate(textNode) {
|
|
1979
|
+
textNode.parentElement && makeTextAlignCenter(textNode.parentElement);
|
|
2048
1980
|
} }),
|
|
2049
1981
|
],
|
|
2050
1982
|
[IInjectedProviderNames.solana]: [
|
|
2051
|
-
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { container: () => getConnectWalletModalByTitle('div[role="dialog"]', 'Connect wallet to continue')
|
|
1983
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { container: () => getConnectWalletModalByTitle('div[role="dialog"]', 'Connect wallet to continue'), afterUpdate(textNode) {
|
|
1984
|
+
textNode.parentElement && makeTextAlignCenter(textNode.parentElement);
|
|
1985
|
+
} }),
|
|
2052
1986
|
],
|
|
2053
1987
|
},
|
|
2054
1988
|
},
|
|
2055
1989
|
{
|
|
2056
1990
|
urls: ['stake.anvm.io'],
|
|
1991
|
+
skip: { mobile: true },
|
|
2057
1992
|
testPath: {
|
|
2058
1993
|
desktop: [':text("Connect Wallet")', ':nth-match(button.rounded-full:text("Connect"),2)'],
|
|
2059
1994
|
'mobile': [
|
|
@@ -2099,7 +2034,7 @@ export const sitesConfig = [
|
|
|
2099
2034
|
{
|
|
2100
2035
|
urls: ['app.reflexer.finance'],
|
|
2101
2036
|
skip: { mobile: true },
|
|
2102
|
-
constraintMap: { icon: [
|
|
2037
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
2103
2038
|
walletsForProvider: {
|
|
2104
2039
|
[IInjectedProviderNames.ethereum]: [
|
|
2105
2040
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '#connect-METAMASK' }),
|
|
@@ -2121,9 +2056,509 @@ export const sitesConfig = [
|
|
|
2121
2056
|
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2122
2057
|
const modal = getConnectWalletModalByTitle('div.ant-modal-content', 'Connect Wallet');
|
|
2123
2058
|
return (modal &&
|
|
2124
|
-
|
|
2059
|
+
findIconAndNameByIcon('img[src*="static/media/metamask"]', 'auto-search-text', name, modal));
|
|
2060
|
+
} }),
|
|
2061
|
+
],
|
|
2062
|
+
},
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
urls: ['app.hydration.net'],
|
|
2066
|
+
walletsForProvider: {
|
|
2067
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2068
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2069
|
+
const modal = getConnectWalletModalByTitle('div[role="dialog"][data-state="open"]', 'Connect wallet');
|
|
2070
|
+
return (modal &&
|
|
2071
|
+
findIconAndNameByIcon('img[src*="assets/MetaMask"][alt="MetaMask Logo"]', 'auto-search-text', name, modal));
|
|
2072
|
+
} }),
|
|
2073
|
+
],
|
|
2074
|
+
[IInjectedProviderNames.polkadot]: [
|
|
2075
|
+
Object.assign(Object.assign({}, basicWalletInfo['polkadot']), { findIconAndName({ name }) {
|
|
2076
|
+
const modal = getConnectWalletModalByTitle('div[role="dialog"][data-state="open"]', 'Connect wallet');
|
|
2077
|
+
return (modal &&
|
|
2078
|
+
findIconAndNameByIcon('img[alt="Polkadotjs Logo"]', 'auto-search-text', name, modal));
|
|
2079
|
+
} }),
|
|
2080
|
+
],
|
|
2081
|
+
},
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
urls: ['app.slingshot.finance'],
|
|
2085
|
+
walletsForProvider: {
|
|
2086
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2087
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2088
|
+
const modal = getConnectWalletModalByTitle('#portal-root>div', 'Connect Wallet');
|
|
2089
|
+
return (modal &&
|
|
2090
|
+
findIconAndNameByName(modal, name, (text) => {
|
|
2091
|
+
var _a, _b, _c;
|
|
2092
|
+
return (_c = (_b = (_a = text === null || text === void 0 ? void 0 : text.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.querySelector('div svg[height="38"]');
|
|
2093
|
+
}));
|
|
2094
|
+
},
|
|
2095
|
+
afterUpdate(textNode) {
|
|
2096
|
+
textNode.parentElement && makeTextAlignLeft(textNode.parentElement);
|
|
2097
|
+
} }),
|
|
2098
|
+
],
|
|
2099
|
+
},
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
urls: ['phux.io'],
|
|
2103
|
+
testPath: ['button:text("Accept")', ':text("Connect Wallet")'],
|
|
2104
|
+
walletsForProvider: {
|
|
2105
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2106
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('div.bal-modal', 'Connect to a wallet') }),
|
|
2107
|
+
],
|
|
2108
|
+
},
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
urls: ['app.metronome.io'],
|
|
2112
|
+
testPath: ['button:text("Switch to")', ':text("Connect Wallet")'],
|
|
2113
|
+
constraintMap: { text: [], 'icon': [isWalletIconLessEqualThan] },
|
|
2114
|
+
walletsForProvider: {
|
|
2115
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2116
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('div.fixed', 'Connect Wallet') }),
|
|
2117
|
+
],
|
|
2118
|
+
},
|
|
2119
|
+
},
|
|
2120
|
+
{
|
|
2121
|
+
urls: ['nftx.io', 'v3.nftx.io'],
|
|
2122
|
+
walletsForProvider: {
|
|
2123
|
+
[IInjectedProviderNames.ethereum]: [metamaskForRainbowKit],
|
|
2124
|
+
},
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
urls: ['app.marsprotocol.io'],
|
|
2128
|
+
testPath: [':text("Connect Wallet")', 'button:has-text("Agree")'],
|
|
2129
|
+
walletsForProvider: {
|
|
2130
|
+
[IInjectedProviderNames.cosmos]: [
|
|
2131
|
+
Object.assign(Object.assign({}, basicWalletInfo['keplr']), { name: /^Keplr Wallet$/, findIconAndName({ name }) {
|
|
2132
|
+
const modal = getConnectWalletModalByTitle('main > div.relative', 'Connect your wallet');
|
|
2133
|
+
return (modal &&
|
|
2134
|
+
findIconAndNameByIcon('img[src*="keplr"][alt="Keplr Wallet"]', 'auto-search-text', name, modal));
|
|
2135
|
+
} }),
|
|
2136
|
+
],
|
|
2137
|
+
},
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
urls: ['farm.acala.network'],
|
|
2141
|
+
walletsForProvider: {
|
|
2142
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2143
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle('#headlessui-portal-root div.relative[id*="headlessui-dialog"]', 'Connect your wallet'), afterUpdate(textNode) {
|
|
2144
|
+
textNode.parentElement && makeTextWrap(textNode.parentElement);
|
|
2145
|
+
} }),
|
|
2146
|
+
],
|
|
2147
|
+
},
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
urls: ['baklava.space'],
|
|
2151
|
+
testUrls: ['baklava.space/vaults/'],
|
|
2152
|
+
walletsForProvider: {
|
|
2153
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2154
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: 'div[role="dialog"][data-reach-dialog-content]' }),
|
|
2155
|
+
],
|
|
2156
|
+
},
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
urls: ['app.lenfi.io'],
|
|
2160
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
2161
|
+
walletsForProvider: {
|
|
2162
|
+
[IInjectedProviderNames.cardano]: [
|
|
2163
|
+
Object.assign(Object.assign({}, basicWalletInfo['nami']), { container: () => {
|
|
2164
|
+
return getConnectWalletModalByTitle('.ReactModalPortal [role="dialog"]', 'Connect wallet');
|
|
2165
|
+
} }),
|
|
2166
|
+
],
|
|
2167
|
+
},
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
urls: ['oyster.synfutures.com'],
|
|
2171
|
+
testPath: {
|
|
2172
|
+
desktop: ['button:text("I Agree")', ':text("Connect Wallet")'],
|
|
2173
|
+
mobile: ['button:text("I Agree")', 'button.wallet-connect-btn-mobile'],
|
|
2174
|
+
},
|
|
2175
|
+
walletsForProvider: {
|
|
2176
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2177
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => getConnectWalletModalByTitle(':is(div[role="dialog"].user-wallet-modal,div.ant-drawer.user-wallet-drawer)', 'Connect Wallet') }),
|
|
2178
|
+
],
|
|
2179
|
+
},
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
urls: ['app.liqee.io'],
|
|
2183
|
+
walletsForProvider: {
|
|
2184
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2185
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2186
|
+
return findIconAndNameByIcon('img[src*="media/wallet-MetaMask"]', 'auto-search-text', name, document.body, { 'icon': [isWalletIconLessEqualThan, isClickable], 'text': [isClickable] }, 2);
|
|
2187
|
+
} }),
|
|
2188
|
+
],
|
|
2189
|
+
},
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
urls: ['app.strike.org'],
|
|
2193
|
+
testPath: {
|
|
2194
|
+
desktop: [':text("Connect")', 'div.button:has-text("Continue")'],
|
|
2195
|
+
mobile: ['div.sc-ecaExY', ':text("Connect")', 'div.button:has-text("Continue")'],
|
|
2196
|
+
},
|
|
2197
|
+
walletsForProvider: {
|
|
2198
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2199
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2200
|
+
const metamaskBtn = document.querySelector('div.ant-modal.connect-modal .metamask-connect-btn');
|
|
2201
|
+
return (metamaskBtn &&
|
|
2202
|
+
findIconAndNameByIcon('img[alt="metamask"]', 'auto-search-text', name, metamaskBtn));
|
|
2203
|
+
} }),
|
|
2204
|
+
],
|
|
2205
|
+
},
|
|
2206
|
+
},
|
|
2207
|
+
// {
|
|
2208
|
+
// urls: ['muesliswap.com'],
|
|
2209
|
+
// constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
2210
|
+
// walletsForProvider: {
|
|
2211
|
+
// [IInjectedProviderNames.cardano]: [
|
|
2212
|
+
// {
|
|
2213
|
+
// ...basicWalletInfo['nami'],
|
|
2214
|
+
// container: () => {
|
|
2215
|
+
// return getConnectWalletModalByTitle(
|
|
2216
|
+
// '.ReactModalPortal [role="dialog"]',
|
|
2217
|
+
// 'Connect wallet',
|
|
2218
|
+
// );
|
|
2219
|
+
// },
|
|
2220
|
+
// },
|
|
2221
|
+
// ],
|
|
2222
|
+
// },
|
|
2223
|
+
// }
|
|
2224
|
+
{
|
|
2225
|
+
urls: ['dapp.cian.app'],
|
|
2226
|
+
testPath: [':text("Cancel")', ':text("Connect")'],
|
|
2227
|
+
walletsForProvider: {
|
|
2228
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2229
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2230
|
+
const modal = getConnectWalletModalByTitle('div[role="dialog"].ant-modal', 'Connect Wallet');
|
|
2231
|
+
return (modal &&
|
|
2232
|
+
findIconAndNameByIcon('img[src*="static/media/metamask"]', 'auto-search-text', name, modal));
|
|
2233
|
+
} }),
|
|
2234
|
+
],
|
|
2235
|
+
},
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
urls: ['app.ib.xyz'],
|
|
2239
|
+
testPath: [':text("Cancel")', ':text("Connect")'],
|
|
2240
|
+
walletsForProvider: {
|
|
2241
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2242
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '.modal .outer-container div.wallets-container ', findIconAndName: ({ container, name }) => {
|
|
2243
|
+
return findIconAndNameInShadowRoot('onboard-v2', container, name);
|
|
2244
|
+
} }),
|
|
2245
|
+
],
|
|
2246
|
+
},
|
|
2247
|
+
},
|
|
2248
|
+
{
|
|
2249
|
+
urls: ['app.aptin.io'],
|
|
2250
|
+
walletsForProvider: {
|
|
2251
|
+
[IInjectedProviderNames.aptos]: [
|
|
2252
|
+
Object.assign(Object.assign({}, basicWalletInfo['petra']), { container: () => getConnectWalletModalByTitle('div.MuiPaper-root.aptin-dialog', 'Connect a wallet') }),
|
|
2253
|
+
],
|
|
2254
|
+
},
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
urls: ['juicebox.money'],
|
|
2258
|
+
testPath: {
|
|
2259
|
+
desktop: [':text("Connect")', 'button:has-text("I Agree")'],
|
|
2260
|
+
mobile: ['nav [role="button"]', ':text("Connect")', 'button:has-text("I Agree")'],
|
|
2261
|
+
},
|
|
2262
|
+
walletsForProvider: {
|
|
2263
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2264
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '.modal .outer-container div.wallets-container ', findIconAndName: ({ container, name }) => {
|
|
2265
|
+
return findIconAndNameInShadowRoot('onboard-v2', container, name);
|
|
2266
|
+
} }),
|
|
2267
|
+
],
|
|
2268
|
+
},
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
urls: ['merlinswap.org'],
|
|
2272
|
+
walletsForProvider: {
|
|
2273
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2274
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2275
|
+
var _a, _b;
|
|
2276
|
+
const textNodes = domUtils.findTextNode('#root', /^Connect Wallet$/, 'all');
|
|
2277
|
+
const text = textNodes === null || textNodes === void 0 ? void 0 : textNodes.find((e) => { var _a, _b; return !!((_b = (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.querySelector('img[src*="lightCloseButton.svg"]')); });
|
|
2278
|
+
const modal = (_b = (_a = text === null || text === void 0 ? void 0 : text.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement;
|
|
2279
|
+
console.log('==>text', text, '==>modal', modal, 'textNodes', textNodes);
|
|
2280
|
+
return ((modal &&
|
|
2281
|
+
findIconAndNameByIcon('img.chakra-image[src*="wallet/metamask.png"]', 'auto-search-text', name, modal)) ||
|
|
2282
|
+
null);
|
|
2283
|
+
} }),
|
|
2284
|
+
],
|
|
2285
|
+
[IInjectedProviderNames.btc]: [
|
|
2286
|
+
Object.assign(Object.assign({}, basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
2287
|
+
var _a, _b;
|
|
2288
|
+
const textNodes = domUtils.findTextNode('#root', /^Connect Wallet$/, 'all');
|
|
2289
|
+
const text = textNodes === null || textNodes === void 0 ? void 0 : textNodes.find((e) => { var _a, _b; return !!((_b = (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.querySelector('img[src*="lightCloseButton.svg"]')); });
|
|
2290
|
+
const modal = (_b = (_a = text === null || text === void 0 ? void 0 : text.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement;
|
|
2291
|
+
return ((modal &&
|
|
2292
|
+
findIconAndNameByIcon('img.chakra-image[src*="wallet/unisat.png"]', 'auto-search-text', name, modal)) ||
|
|
2293
|
+
null);
|
|
2294
|
+
} }),
|
|
2295
|
+
],
|
|
2296
|
+
},
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
urls: ['testnet.zkbase.app'],
|
|
2300
|
+
walletsForProvider: {
|
|
2301
|
+
[IInjectedProviderNames.btc]: [
|
|
2302
|
+
Object.assign(Object.assign({}, basicWalletInfo['unisat']), { container: () => getConnectWalletModalByTitle('div.modal-panel.w-full', 'Connect Wallet') }),
|
|
2303
|
+
],
|
|
2304
|
+
},
|
|
2305
|
+
},
|
|
2306
|
+
{
|
|
2307
|
+
urls: ['veno.finance'],
|
|
2308
|
+
walletsForProvider: {
|
|
2309
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2310
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName: ({ container, name }) => {
|
|
2311
|
+
const modal = getConnectWalletModalByTitle('section[role="dialog"].chakra-modal__content', 'Connect wallet');
|
|
2312
|
+
return (modal && findIconAndNameByIcon('img[alt="MetaMask"]', 'auto-search-text', name, modal));
|
|
2313
|
+
} }),
|
|
2314
|
+
],
|
|
2315
|
+
},
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
urls: ['www.tarot.to'],
|
|
2319
|
+
testPath: {
|
|
2320
|
+
'desktop': ['button:has-text("Accept")', ':text("Connect Wallet")'],
|
|
2321
|
+
mobile: ['button:has-text("Accept")', 'nav button.inline-flex', ':text("Connect")'],
|
|
2322
|
+
},
|
|
2323
|
+
walletsForProvider: {
|
|
2324
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2325
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => {
|
|
2326
|
+
return getConnectWalletModalByTitle('div[role="dialog"].fixed.z-tarotModal', 'Connect Wallet');
|
|
2327
|
+
} }),
|
|
2328
|
+
],
|
|
2329
|
+
},
|
|
2330
|
+
},
|
|
2331
|
+
{
|
|
2332
|
+
urls: ['myfil.pages.dev'],
|
|
2333
|
+
walletsForProvider: {
|
|
2334
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2335
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => {
|
|
2336
|
+
return getConnectWalletModalByTitle('div[role="dialog"].ant-modal-wrap', 'Connect Wallet');
|
|
2337
|
+
} }),
|
|
2338
|
+
],
|
|
2339
|
+
},
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
urls: ['app.term.finance'],
|
|
2343
|
+
skip: true,
|
|
2344
|
+
walletsForProvider: {
|
|
2345
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2346
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => {
|
|
2347
|
+
return getConnectWalletModalByTitle('section[role="dialog"].chakra-modal__content', 'Connect Wallet');
|
|
2348
|
+
} }),
|
|
2349
|
+
],
|
|
2350
|
+
},
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
urls: ['app.ribbon.finance'],
|
|
2354
|
+
// testPath: { desktop: [":text('Connect Wallet')", ':text(Ethereum)'] },
|
|
2355
|
+
skip: true,
|
|
2356
|
+
walletsForProvider: {
|
|
2357
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2358
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: () => {
|
|
2359
|
+
return getConnectWalletModalByTitle('div[role="dialog"].modal', 'CONNECT WALLET');
|
|
2360
|
+
} }),
|
|
2361
|
+
],
|
|
2362
|
+
[IInjectedProviderNames.solana]: [
|
|
2363
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { container: () => {
|
|
2364
|
+
return getConnectWalletModalByTitle('div[role="dialog"].modal', 'CONNECT WALLET');
|
|
2365
|
+
} }),
|
|
2366
|
+
],
|
|
2367
|
+
},
|
|
2368
|
+
},
|
|
2369
|
+
{
|
|
2370
|
+
urls: ['app.pstake.finance'],
|
|
2371
|
+
skip: true,
|
|
2372
|
+
testUrls: ['app.pstake.finance/cosmos'],
|
|
2373
|
+
walletsForProvider: {
|
|
2374
|
+
[IInjectedProviderNames.cosmos]: [
|
|
2375
|
+
Object.assign(Object.assign({}, basicWalletInfo['keplr']), { container: () => {
|
|
2376
|
+
return getConnectWalletModalByTitle('.modal.wallets-modal', 'Connect wallet');
|
|
2377
|
+
} }),
|
|
2378
|
+
],
|
|
2379
|
+
},
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
urls: ['solo.top'],
|
|
2383
|
+
skip: { mobile: true },
|
|
2384
|
+
constraintMap: { icon: [isWalletIconLessEqualThan], text: [] },
|
|
2385
|
+
walletsForProvider: {
|
|
2386
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2387
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '#connect-METAMASK' }),
|
|
2388
|
+
],
|
|
2389
|
+
},
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
urls: ['keep3r.network'],
|
|
2393
|
+
testPath: {
|
|
2394
|
+
desktop: [':text("Connect wallet")'],
|
|
2395
|
+
mobile: ['button.fixed.flex'],
|
|
2396
|
+
},
|
|
2397
|
+
walletsForProvider: {
|
|
2398
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2399
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '.yearn--modal' }),
|
|
2400
|
+
],
|
|
2401
|
+
},
|
|
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));
|
|
2125
2479
|
} }),
|
|
2126
2480
|
],
|
|
2127
2481
|
},
|
|
2128
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
|
+
},
|
|
2129
2564
|
];
|