@onekeyfe/inpage-providers-hub 2.2.15 → 2.2.17
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/index.js +0 -6
- package/dist/cjs/connectButtonHack/universal/config.js +323 -3
- package/dist/connectButtonHack/index.js +0 -6
- package/dist/connectButtonHack/universal/config.js +323 -3
- package/package.json +23 -23
- package/dist/cjs/connectButtonHack/sites/lidofi.js +0 -55
- package/dist/cjs/connectButtonHack/sites/rocketpool.js +0 -39
- package/dist/cjs/connectButtonHack/sites/solv.js +0 -45
- package/dist/connectButtonHack/sites/lidofi.d.ts +0 -2
- package/dist/connectButtonHack/sites/lidofi.js +0 -53
- package/dist/connectButtonHack/sites/rocketpool.d.ts +0 -2
- package/dist/connectButtonHack/sites/rocketpool.js +0 -37
- package/dist/connectButtonHack/sites/solv.d.ts +0 -2
- package/dist/connectButtonHack/sites/solv.js +0 -40
|
@@ -30,9 +30,7 @@ const ord_1 = __importDefault(require("./sites/ord"));
|
|
|
30
30
|
const ordinalswallet_1 = __importDefault(require("./sites/ordinalswallet"));
|
|
31
31
|
const ordinalsmarket_1 = __importDefault(require("./sites/ordinalsmarket"));
|
|
32
32
|
const sating_1 = __importDefault(require("./sites/sating"));
|
|
33
|
-
const lidofi_1 = __importDefault(require("./sites/lidofi"));
|
|
34
33
|
const eigenlayer_1 = __importDefault(require("./sites/eigenlayer"));
|
|
35
|
-
const rocketpool_1 = __importDefault(require("./sites/rocketpool"));
|
|
36
34
|
const liteInstadapp_1 = __importDefault(require("./sites/liteInstadapp"));
|
|
37
35
|
const methMantle_1 = __importDefault(require("./sites/methMantle"));
|
|
38
36
|
const balancerFi_1 = __importDefault(require("./sites/balancerFi"));
|
|
@@ -41,7 +39,6 @@ const renzoprotocol_1 = __importDefault(require("./sites/renzoprotocol"));
|
|
|
41
39
|
const boringdao_1 = __importDefault(require("./sites/boringdao"));
|
|
42
40
|
const hope_1 = __importDefault(require("./sites/hope"));
|
|
43
41
|
const hyperliquid_1 = __importDefault(require("./sites/hyperliquid"));
|
|
44
|
-
const solv_1 = __importDefault(require("./sites/solv"));
|
|
45
42
|
const silo_1 = __importDefault(require("./sites/silo"));
|
|
46
43
|
const mux_1 = __importDefault(require("./sites/mux"));
|
|
47
44
|
const stargateFinance_1 = __importDefault(require("./sites/stargateFinance"));
|
|
@@ -72,9 +69,7 @@ function hackAllConnectButtons() {
|
|
|
72
69
|
(0, ordinalswallet_1.default)();
|
|
73
70
|
(0, ordinalsmarket_1.default)();
|
|
74
71
|
(0, sating_1.default)();
|
|
75
|
-
(0, lidofi_1.default)();
|
|
76
72
|
(0, eigenlayer_1.default)();
|
|
77
|
-
(0, rocketpool_1.default)();
|
|
78
73
|
(0, liteInstadapp_1.default)();
|
|
79
74
|
(0, methMantle_1.default)();
|
|
80
75
|
(0, balancerFi_1.default)();
|
|
@@ -83,7 +78,6 @@ function hackAllConnectButtons() {
|
|
|
83
78
|
(0, boringdao_1.default)();
|
|
84
79
|
(0, hope_1.default)();
|
|
85
80
|
(0, hyperliquid_1.default)();
|
|
86
|
-
(0, solv_1.default)();
|
|
87
81
|
(0, silo_1.default)();
|
|
88
82
|
(0, mux_1.default)();
|
|
89
83
|
(0, stargateFinance_1.default)();
|
|
@@ -2858,9 +2858,18 @@ exports.sitesConfig = [
|
|
|
2858
2858
|
[cross_inpage_provider_types_1.IInjectedProviderNames.solana]: [
|
|
2859
2859
|
Object.assign(Object.assign({}, exports.basicWalletInfo['phantom']), { container: 'div.wallet-list', afterUpdate(textNode) {
|
|
2860
2860
|
const ledgerInput = document.getElementById('connect-ledger-wallet-with-phantom');
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2861
|
+
if (textNode) {
|
|
2862
|
+
textNode.textContent = 'OneKey Hardware & Phantom';
|
|
2863
|
+
}
|
|
2864
|
+
const label = ledgerInput === null || ledgerInput === void 0 ? void 0 : ledgerInput.parentElement;
|
|
2865
|
+
if (label) {
|
|
2866
|
+
const span = label.querySelector('span');
|
|
2867
|
+
if (span) {
|
|
2868
|
+
span.textContent = 'I am using my ledger/onekey hardware with one of these wallets';
|
|
2869
|
+
}
|
|
2870
|
+
label.style.padding = '20px';
|
|
2871
|
+
label.style.display = 'flex';
|
|
2872
|
+
label.style.alignItems = 'center';
|
|
2864
2873
|
}
|
|
2865
2874
|
} }),
|
|
2866
2875
|
],
|
|
@@ -2883,4 +2892,315 @@ exports.sitesConfig = [
|
|
|
2883
2892
|
],
|
|
2884
2893
|
},
|
|
2885
2894
|
},
|
|
2895
|
+
{
|
|
2896
|
+
urls: ['stake.lido.fi'],
|
|
2897
|
+
walletsForProvider: {
|
|
2898
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
2899
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: '#reef-knot-modal-root' }),
|
|
2900
|
+
],
|
|
2901
|
+
},
|
|
2902
|
+
},
|
|
2903
|
+
{
|
|
2904
|
+
urls: ['bridge.arbitrum.io'],
|
|
2905
|
+
walletsForProvider: {
|
|
2906
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
2907
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: 'div[role="document"]', findIconAndName({ name, container }) {
|
|
2908
|
+
var _a;
|
|
2909
|
+
const modal = (0, utils_1.getConnectWalletModalByTitle)(container, 'Connect a Wallet');
|
|
2910
|
+
return (_a = (modal && (0, findIconAndName_1.findIconAndNameByName)(modal, name, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
2911
|
+
} }),
|
|
2912
|
+
],
|
|
2913
|
+
},
|
|
2914
|
+
},
|
|
2915
|
+
{
|
|
2916
|
+
urls: ['app.optimism.io'],
|
|
2917
|
+
walletsForProvider: {
|
|
2918
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
2919
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: 'div[role="document"]' }),
|
|
2920
|
+
],
|
|
2921
|
+
},
|
|
2922
|
+
},
|
|
2923
|
+
{
|
|
2924
|
+
urls: ['stake.rocketpool.net'],
|
|
2925
|
+
walletsForProvider: {
|
|
2926
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
2927
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2928
|
+
const modal = document.querySelector('div[role="dialog"].fixed.inset-0');
|
|
2929
|
+
return modal && (0, findIconAndName_1.findIconAndNameByIcon)('img[alt="MetaMask"]', 'auto-search-text', name, modal);
|
|
2930
|
+
} }),
|
|
2931
|
+
],
|
|
2932
|
+
},
|
|
2933
|
+
},
|
|
2934
|
+
{
|
|
2935
|
+
urls: ['app.solv.finance'],
|
|
2936
|
+
walletsForProvider: {
|
|
2937
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
2938
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: 'div[role="dialog"]', findIconAndName({ name }) {
|
|
2939
|
+
var _a;
|
|
2940
|
+
const modal = (0, utils_1.getConnectWalletModalByTitle)('div[role="dialog"]', 'Connect your wallet');
|
|
2941
|
+
return (_a = (modal && (0, findIconAndName_1.findIconAndNameByName)(modal, name, 'auto-search-icon', {
|
|
2942
|
+
icon: [
|
|
2943
|
+
imgUtils_1.isWalletIconLessEqualThan,
|
|
2944
|
+
(icon) => icon.getAttribute('aria-hidden') !== 'true'
|
|
2945
|
+
],
|
|
2946
|
+
text: []
|
|
2947
|
+
}))) !== null && _a !== void 0 ? _a : null;
|
|
2948
|
+
} }),
|
|
2949
|
+
],
|
|
2950
|
+
},
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
urls: ['app.symbiotic.fi'],
|
|
2954
|
+
walletsForProvider: {
|
|
2955
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
2956
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { container: 'div[data-dialog-wrapper="true"]', findIconAndName({ name, container }) {
|
|
2957
|
+
var _a;
|
|
2958
|
+
const modal = (0, utils_1.getConnectWalletModalByTitle)(container, 'CONNECT WALLET');
|
|
2959
|
+
return (_a = (modal && (0, findIconAndName_1.findIconAndNameByName)(modal, name, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
2960
|
+
} }),
|
|
2961
|
+
],
|
|
2962
|
+
},
|
|
2963
|
+
},
|
|
2964
|
+
{
|
|
2965
|
+
urls: ['app.free.tech', 'core.app', 'blast.io'],
|
|
2966
|
+
walletsForProvider: {
|
|
2967
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
2968
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2969
|
+
var _a;
|
|
2970
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
2971
|
+
} }),
|
|
2972
|
+
],
|
|
2973
|
+
},
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
urls: ['yieldlayer.cian.app'],
|
|
2977
|
+
walletsForProvider: {
|
|
2978
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
2979
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['walletconnect']), { container: () => (0, utils_1.getConnectWalletModalByTitle)('div[role="dialog"]', 'Connect Wallet') }),
|
|
2980
|
+
],
|
|
2981
|
+
},
|
|
2982
|
+
},
|
|
2983
|
+
{
|
|
2984
|
+
urls: ['app.unirouter.io'],
|
|
2985
|
+
walletsForProvider: {
|
|
2986
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.btc]: [
|
|
2987
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
2988
|
+
const modal = (0, utils_1.getConnectWalletModalByTitle)('div.dropdown.dropdown-end', 'Connect Wallet');
|
|
2989
|
+
return modal && (0, findIconAndName_1.findIconAndNameByIcon)('img[alt="Unisat Wallet"]', 'auto-search-text', name, modal);
|
|
2990
|
+
},
|
|
2991
|
+
afterUpdate(textNode, iconNode) {
|
|
2992
|
+
if (textNode) {
|
|
2993
|
+
textNode.textContent = 'OneKey&UniSat';
|
|
2994
|
+
}
|
|
2995
|
+
if (iconNode) {
|
|
2996
|
+
iconNode.style.width = '28px';
|
|
2997
|
+
iconNode.style.height = '28px';
|
|
2998
|
+
}
|
|
2999
|
+
} }),
|
|
3000
|
+
],
|
|
3001
|
+
},
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
urls: ['sunswap.com'],
|
|
3005
|
+
walletsForProvider: {
|
|
3006
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.tron]: [
|
|
3007
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['tronlink']), { container: () => {
|
|
3008
|
+
return (0, utils_1.getConnectWalletModalByTitle)('div.ant-modal-content', 'Connect to Wallet');
|
|
3009
|
+
} }),
|
|
3010
|
+
],
|
|
3011
|
+
},
|
|
3012
|
+
},
|
|
3013
|
+
{
|
|
3014
|
+
urls: ['dashboard.threshold.network'],
|
|
3015
|
+
walletsForProvider: {
|
|
3016
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3017
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3018
|
+
var _a;
|
|
3019
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon', {
|
|
3020
|
+
icon: [
|
|
3021
|
+
(icon) => icon.classList.contains('chakra-icon')
|
|
3022
|
+
],
|
|
3023
|
+
text: []
|
|
3024
|
+
})) !== null && _a !== void 0 ? _a : null;
|
|
3025
|
+
} }),
|
|
3026
|
+
],
|
|
3027
|
+
},
|
|
3028
|
+
},
|
|
3029
|
+
{
|
|
3030
|
+
urls: ['app.pell.network'],
|
|
3031
|
+
walletsForProvider: {
|
|
3032
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3033
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3034
|
+
var _a;
|
|
3035
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3036
|
+
} }),
|
|
3037
|
+
],
|
|
3038
|
+
},
|
|
3039
|
+
},
|
|
3040
|
+
{
|
|
3041
|
+
urls: ['www.bitlayer.org'],
|
|
3042
|
+
walletsForProvider: {
|
|
3043
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.btc]: [
|
|
3044
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
3045
|
+
var _a;
|
|
3046
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3047
|
+
},
|
|
3048
|
+
afterUpdate(textNode, iconNode) {
|
|
3049
|
+
if (iconNode) {
|
|
3050
|
+
iconNode.style.width = '26px';
|
|
3051
|
+
iconNode.style.height = '26px';
|
|
3052
|
+
}
|
|
3053
|
+
} }),
|
|
3054
|
+
],
|
|
3055
|
+
},
|
|
3056
|
+
},
|
|
3057
|
+
{
|
|
3058
|
+
urls: ['app.abex.fi'],
|
|
3059
|
+
walletsForProvider: {
|
|
3060
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.sui]: [
|
|
3061
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['suiwallet']), { container: "div[role='dialog'].wkit-dialog__content" }),
|
|
3062
|
+
],
|
|
3063
|
+
},
|
|
3064
|
+
},
|
|
3065
|
+
{
|
|
3066
|
+
urls: ['dex.bluemove.net'],
|
|
3067
|
+
walletsForProvider: {
|
|
3068
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.sui]: [
|
|
3069
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['suiwallet']), { findIconAndName({ name }) {
|
|
3070
|
+
var _a;
|
|
3071
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3072
|
+
},
|
|
3073
|
+
afterUpdate(textNode, iconNode) {
|
|
3074
|
+
if (iconNode) {
|
|
3075
|
+
iconNode.style.width = '32px';
|
|
3076
|
+
iconNode.style.height = '32px';
|
|
3077
|
+
}
|
|
3078
|
+
} }),
|
|
3079
|
+
],
|
|
3080
|
+
},
|
|
3081
|
+
},
|
|
3082
|
+
{
|
|
3083
|
+
urls: ['app.sudo.finance'],
|
|
3084
|
+
walletsForProvider: {
|
|
3085
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.sui]: [
|
|
3086
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['suiwallet']), { container: "div[role='dialog'].wkit-dialog__content" }),
|
|
3087
|
+
],
|
|
3088
|
+
},
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
urls: ['app.streamflow.finance'],
|
|
3092
|
+
walletsForProvider: {
|
|
3093
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.sui]: [
|
|
3094
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['suiwallet']), { container: "div.w-full.sm\\:w-100" }),
|
|
3095
|
+
],
|
|
3096
|
+
},
|
|
3097
|
+
},
|
|
3098
|
+
{
|
|
3099
|
+
urls: ['farm.bucketprotocol.io'],
|
|
3100
|
+
walletsForProvider: {
|
|
3101
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.sui]: [
|
|
3102
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['suiwallet']), { findIconAndName({ name }) {
|
|
3103
|
+
const modal = (0, utils_1.getConnectWalletModalByTitle)('div[role="dialog"]', 'Connect a Wallet from list');
|
|
3104
|
+
return modal && (0, findIconAndName_1.findIconAndNameByIcon)('img[alt="Sui Wallet"]', 'auto-search-text', name, modal);
|
|
3105
|
+
} }),
|
|
3106
|
+
],
|
|
3107
|
+
},
|
|
3108
|
+
},
|
|
3109
|
+
{
|
|
3110
|
+
urls: ['stake.volosui.com'],
|
|
3111
|
+
walletsForProvider: {
|
|
3112
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.sui]: [
|
|
3113
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['suiwallet']), { container: "div[role='dialog'].wkit-dialog__content" }),
|
|
3114
|
+
],
|
|
3115
|
+
},
|
|
3116
|
+
},
|
|
3117
|
+
{
|
|
3118
|
+
urls: ['app.houstonswap.io'],
|
|
3119
|
+
walletsForProvider: {
|
|
3120
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.aptos]: [
|
|
3121
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['petra']), { container: 'div.relative.rounded-lg.bg-white.shadow' }),
|
|
3122
|
+
],
|
|
3123
|
+
},
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
urls: ['app.eternalfinance.io'],
|
|
3127
|
+
walletsForProvider: {
|
|
3128
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.aptos]: [
|
|
3129
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['petra']), { container: 'div.relative.rounded-lg.bg-white.shadow' }),
|
|
3130
|
+
],
|
|
3131
|
+
},
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
urls: ['launchpad.movegpt.io'],
|
|
3135
|
+
walletsForProvider: {
|
|
3136
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.aptos]: [
|
|
3137
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['petra']), { findIconAndName({ name }) {
|
|
3138
|
+
var _a;
|
|
3139
|
+
const modal = (0, utils_1.getConnectWalletModalByTitle)('div[role="dialog"]', 'Connect wallet');
|
|
3140
|
+
return (_a = (modal && (0, findIconAndName_1.findIconAndNameByName)(modal, name, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
3141
|
+
} }),
|
|
3142
|
+
],
|
|
3143
|
+
},
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
urls: ['tsunami.finance'],
|
|
3147
|
+
walletsForProvider: {
|
|
3148
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
|
|
3149
|
+
},
|
|
3150
|
+
},
|
|
3151
|
+
{
|
|
3152
|
+
urls: ['portalbridge.com'],
|
|
3153
|
+
walletsForProvider: {
|
|
3154
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.aptos]: [
|
|
3155
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['martian']), { findIconAndName({ name }) {
|
|
3156
|
+
var _a;
|
|
3157
|
+
const modal = (0, utils_1.getConnectWalletModalByTitle)('div.MuiTypography-root.MuiTypography-body1.css-jeyoma-MuiTypography-root', 'Connect a wallet');
|
|
3158
|
+
return (_a = (modal && (0, findIconAndName_1.findIconAndNameByName)(modal, name, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
3159
|
+
} }),
|
|
3160
|
+
],
|
|
3161
|
+
},
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
urls: ['app.aptoslaunch.io'],
|
|
3165
|
+
walletsForProvider: {
|
|
3166
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.aptos]: [
|
|
3167
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['petra']), { findIconAndName(wallet) {
|
|
3168
|
+
return (0, findIconAndName_1.findIconAndNameByIcon)(() => {
|
|
3169
|
+
var _a;
|
|
3170
|
+
return (_a = Array.from(document.querySelectorAll('img[alt="Petra icon"]')).filter((e) => (0, utils_1.isVisible)(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3171
|
+
}, 'auto-search-text', wallet.name);
|
|
3172
|
+
} }),
|
|
3173
|
+
],
|
|
3174
|
+
},
|
|
3175
|
+
},
|
|
3176
|
+
{
|
|
3177
|
+
urls: ['app.animeswap.org'],
|
|
3178
|
+
walletsForProvider: {
|
|
3179
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.aptos]: [
|
|
3180
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['petra']), { findIconAndName(wallet) {
|
|
3181
|
+
return (0, findIconAndName_1.findIconAndNameByIcon)(() => {
|
|
3182
|
+
var _a;
|
|
3183
|
+
return (_a = Array.from(document.querySelectorAll('img[src*="./static/media/petra"]')).filter((e) => (0, utils_1.isVisible)(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3184
|
+
}, 'auto-search-text', wallet.name);
|
|
3185
|
+
} }),
|
|
3186
|
+
],
|
|
3187
|
+
},
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
urls: ['bluemove.net'],
|
|
3191
|
+
walletsForProvider: {
|
|
3192
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.aptos]: [
|
|
3193
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['petra']), { findIconAndName({ name }) {
|
|
3194
|
+
var _a;
|
|
3195
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3196
|
+
},
|
|
3197
|
+
afterUpdate(textNode, iconNode) {
|
|
3198
|
+
if (iconNode) {
|
|
3199
|
+
iconNode.style.width = '28px';
|
|
3200
|
+
iconNode.style.height = '28px';
|
|
3201
|
+
}
|
|
3202
|
+
} }),
|
|
3203
|
+
],
|
|
3204
|
+
},
|
|
3205
|
+
},
|
|
2886
3206
|
];
|
|
@@ -24,9 +24,7 @@ import ord from './sites/ord';
|
|
|
24
24
|
import ordinalswallet from './sites/ordinalswallet';
|
|
25
25
|
import ordinalsmarket from './sites/ordinalsmarket';
|
|
26
26
|
import sating from './sites/sating';
|
|
27
|
-
import lidofi from './sites/lidofi';
|
|
28
27
|
import eigenlayer from './sites/eigenlayer';
|
|
29
|
-
import rocketpool from './sites/rocketpool';
|
|
30
28
|
import liteInstadapp from './sites/liteInstadapp';
|
|
31
29
|
import methMantle from './sites/methMantle';
|
|
32
30
|
import balancerFi from './sites/balancerFi';
|
|
@@ -35,7 +33,6 @@ import renzoprotocol from './sites/renzoprotocol';
|
|
|
35
33
|
import boringdao from './sites/boringdao';
|
|
36
34
|
import hope from './sites/hope';
|
|
37
35
|
import hyperliquid from './sites/hyperliquid';
|
|
38
|
-
import solv from './sites/solv';
|
|
39
36
|
import silo from './sites/silo';
|
|
40
37
|
import mux from './sites/mux';
|
|
41
38
|
import stargateFinance from './sites/stargateFinance';
|
|
@@ -66,9 +63,7 @@ function hackAllConnectButtons() {
|
|
|
66
63
|
ordinalswallet();
|
|
67
64
|
ordinalsmarket();
|
|
68
65
|
sating();
|
|
69
|
-
lidofi();
|
|
70
66
|
eigenlayer();
|
|
71
|
-
rocketpool();
|
|
72
67
|
liteInstadapp();
|
|
73
68
|
methMantle();
|
|
74
69
|
balancerFi();
|
|
@@ -77,7 +72,6 @@ function hackAllConnectButtons() {
|
|
|
77
72
|
boringdao();
|
|
78
73
|
hope();
|
|
79
74
|
hyperliquid();
|
|
80
|
-
solv();
|
|
81
75
|
silo();
|
|
82
76
|
mux();
|
|
83
77
|
stargateFinance();
|
|
@@ -2852,9 +2852,18 @@ export const sitesConfig = [
|
|
|
2852
2852
|
[IInjectedProviderNames.solana]: [
|
|
2853
2853
|
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { container: 'div.wallet-list', afterUpdate(textNode) {
|
|
2854
2854
|
const ledgerInput = document.getElementById('connect-ledger-wallet-with-phantom');
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2855
|
+
if (textNode) {
|
|
2856
|
+
textNode.textContent = 'OneKey Hardware & Phantom';
|
|
2857
|
+
}
|
|
2858
|
+
const label = ledgerInput === null || ledgerInput === void 0 ? void 0 : ledgerInput.parentElement;
|
|
2859
|
+
if (label) {
|
|
2860
|
+
const span = label.querySelector('span');
|
|
2861
|
+
if (span) {
|
|
2862
|
+
span.textContent = 'I am using my ledger/onekey hardware with one of these wallets';
|
|
2863
|
+
}
|
|
2864
|
+
label.style.padding = '20px';
|
|
2865
|
+
label.style.display = 'flex';
|
|
2866
|
+
label.style.alignItems = 'center';
|
|
2858
2867
|
}
|
|
2859
2868
|
} }),
|
|
2860
2869
|
],
|
|
@@ -2877,4 +2886,315 @@ export const sitesConfig = [
|
|
|
2877
2886
|
],
|
|
2878
2887
|
},
|
|
2879
2888
|
},
|
|
2889
|
+
{
|
|
2890
|
+
urls: ['stake.lido.fi'],
|
|
2891
|
+
walletsForProvider: {
|
|
2892
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2893
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: '#reef-knot-modal-root' }),
|
|
2894
|
+
],
|
|
2895
|
+
},
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
urls: ['bridge.arbitrum.io'],
|
|
2899
|
+
walletsForProvider: {
|
|
2900
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2901
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: 'div[role="document"]', findIconAndName({ name, container }) {
|
|
2902
|
+
var _a;
|
|
2903
|
+
const modal = getConnectWalletModalByTitle(container, 'Connect a Wallet');
|
|
2904
|
+
return (_a = (modal && findIconAndNameByName(modal, name, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
2905
|
+
} }),
|
|
2906
|
+
],
|
|
2907
|
+
},
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
urls: ['app.optimism.io'],
|
|
2911
|
+
walletsForProvider: {
|
|
2912
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2913
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: 'div[role="document"]' }),
|
|
2914
|
+
],
|
|
2915
|
+
},
|
|
2916
|
+
},
|
|
2917
|
+
{
|
|
2918
|
+
urls: ['stake.rocketpool.net'],
|
|
2919
|
+
walletsForProvider: {
|
|
2920
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2921
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2922
|
+
const modal = document.querySelector('div[role="dialog"].fixed.inset-0');
|
|
2923
|
+
return modal && findIconAndNameByIcon('img[alt="MetaMask"]', 'auto-search-text', name, modal);
|
|
2924
|
+
} }),
|
|
2925
|
+
],
|
|
2926
|
+
},
|
|
2927
|
+
},
|
|
2928
|
+
{
|
|
2929
|
+
urls: ['app.solv.finance'],
|
|
2930
|
+
walletsForProvider: {
|
|
2931
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2932
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: 'div[role="dialog"]', findIconAndName({ name }) {
|
|
2933
|
+
var _a;
|
|
2934
|
+
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect your wallet');
|
|
2935
|
+
return (_a = (modal && findIconAndNameByName(modal, name, 'auto-search-icon', {
|
|
2936
|
+
icon: [
|
|
2937
|
+
isWalletIconLessEqualThan,
|
|
2938
|
+
(icon) => icon.getAttribute('aria-hidden') !== 'true'
|
|
2939
|
+
],
|
|
2940
|
+
text: []
|
|
2941
|
+
}))) !== null && _a !== void 0 ? _a : null;
|
|
2942
|
+
} }),
|
|
2943
|
+
],
|
|
2944
|
+
},
|
|
2945
|
+
},
|
|
2946
|
+
{
|
|
2947
|
+
urls: ['app.symbiotic.fi'],
|
|
2948
|
+
walletsForProvider: {
|
|
2949
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2950
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { container: 'div[data-dialog-wrapper="true"]', findIconAndName({ name, container }) {
|
|
2951
|
+
var _a;
|
|
2952
|
+
const modal = getConnectWalletModalByTitle(container, 'CONNECT WALLET');
|
|
2953
|
+
return (_a = (modal && findIconAndNameByName(modal, name, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
2954
|
+
} }),
|
|
2955
|
+
],
|
|
2956
|
+
},
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
urls: ['app.free.tech', 'core.app', 'blast.io'],
|
|
2960
|
+
walletsForProvider: {
|
|
2961
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2962
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
2963
|
+
var _a;
|
|
2964
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
2965
|
+
} }),
|
|
2966
|
+
],
|
|
2967
|
+
},
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
urls: ['yieldlayer.cian.app'],
|
|
2971
|
+
walletsForProvider: {
|
|
2972
|
+
[IInjectedProviderNames.ethereum]: [
|
|
2973
|
+
Object.assign(Object.assign({}, basicWalletInfo['walletconnect']), { container: () => getConnectWalletModalByTitle('div[role="dialog"]', 'Connect Wallet') }),
|
|
2974
|
+
],
|
|
2975
|
+
},
|
|
2976
|
+
},
|
|
2977
|
+
{
|
|
2978
|
+
urls: ['app.unirouter.io'],
|
|
2979
|
+
walletsForProvider: {
|
|
2980
|
+
[IInjectedProviderNames.btc]: [
|
|
2981
|
+
Object.assign(Object.assign({}, basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
2982
|
+
const modal = getConnectWalletModalByTitle('div.dropdown.dropdown-end', 'Connect Wallet');
|
|
2983
|
+
return modal && findIconAndNameByIcon('img[alt="Unisat Wallet"]', 'auto-search-text', name, modal);
|
|
2984
|
+
},
|
|
2985
|
+
afterUpdate(textNode, iconNode) {
|
|
2986
|
+
if (textNode) {
|
|
2987
|
+
textNode.textContent = 'OneKey&UniSat';
|
|
2988
|
+
}
|
|
2989
|
+
if (iconNode) {
|
|
2990
|
+
iconNode.style.width = '28px';
|
|
2991
|
+
iconNode.style.height = '28px';
|
|
2992
|
+
}
|
|
2993
|
+
} }),
|
|
2994
|
+
],
|
|
2995
|
+
},
|
|
2996
|
+
},
|
|
2997
|
+
{
|
|
2998
|
+
urls: ['sunswap.com'],
|
|
2999
|
+
walletsForProvider: {
|
|
3000
|
+
[IInjectedProviderNames.tron]: [
|
|
3001
|
+
Object.assign(Object.assign({}, basicWalletInfo['tronlink']), { container: () => {
|
|
3002
|
+
return getConnectWalletModalByTitle('div.ant-modal-content', 'Connect to Wallet');
|
|
3003
|
+
} }),
|
|
3004
|
+
],
|
|
3005
|
+
},
|
|
3006
|
+
},
|
|
3007
|
+
{
|
|
3008
|
+
urls: ['dashboard.threshold.network'],
|
|
3009
|
+
walletsForProvider: {
|
|
3010
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3011
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3012
|
+
var _a;
|
|
3013
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon', {
|
|
3014
|
+
icon: [
|
|
3015
|
+
(icon) => icon.classList.contains('chakra-icon')
|
|
3016
|
+
],
|
|
3017
|
+
text: []
|
|
3018
|
+
})) !== null && _a !== void 0 ? _a : null;
|
|
3019
|
+
} }),
|
|
3020
|
+
],
|
|
3021
|
+
},
|
|
3022
|
+
},
|
|
3023
|
+
{
|
|
3024
|
+
urls: ['app.pell.network'],
|
|
3025
|
+
walletsForProvider: {
|
|
3026
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3027
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3028
|
+
var _a;
|
|
3029
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3030
|
+
} }),
|
|
3031
|
+
],
|
|
3032
|
+
},
|
|
3033
|
+
},
|
|
3034
|
+
{
|
|
3035
|
+
urls: ['www.bitlayer.org'],
|
|
3036
|
+
walletsForProvider: {
|
|
3037
|
+
[IInjectedProviderNames.btc]: [
|
|
3038
|
+
Object.assign(Object.assign({}, basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
3039
|
+
var _a;
|
|
3040
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3041
|
+
},
|
|
3042
|
+
afterUpdate(textNode, iconNode) {
|
|
3043
|
+
if (iconNode) {
|
|
3044
|
+
iconNode.style.width = '26px';
|
|
3045
|
+
iconNode.style.height = '26px';
|
|
3046
|
+
}
|
|
3047
|
+
} }),
|
|
3048
|
+
],
|
|
3049
|
+
},
|
|
3050
|
+
},
|
|
3051
|
+
{
|
|
3052
|
+
urls: ['app.abex.fi'],
|
|
3053
|
+
walletsForProvider: {
|
|
3054
|
+
[IInjectedProviderNames.sui]: [
|
|
3055
|
+
Object.assign(Object.assign({}, basicWalletInfo['suiwallet']), { container: "div[role='dialog'].wkit-dialog__content" }),
|
|
3056
|
+
],
|
|
3057
|
+
},
|
|
3058
|
+
},
|
|
3059
|
+
{
|
|
3060
|
+
urls: ['dex.bluemove.net'],
|
|
3061
|
+
walletsForProvider: {
|
|
3062
|
+
[IInjectedProviderNames.sui]: [
|
|
3063
|
+
Object.assign(Object.assign({}, basicWalletInfo['suiwallet']), { findIconAndName({ name }) {
|
|
3064
|
+
var _a;
|
|
3065
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3066
|
+
},
|
|
3067
|
+
afterUpdate(textNode, iconNode) {
|
|
3068
|
+
if (iconNode) {
|
|
3069
|
+
iconNode.style.width = '32px';
|
|
3070
|
+
iconNode.style.height = '32px';
|
|
3071
|
+
}
|
|
3072
|
+
} }),
|
|
3073
|
+
],
|
|
3074
|
+
},
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
urls: ['app.sudo.finance'],
|
|
3078
|
+
walletsForProvider: {
|
|
3079
|
+
[IInjectedProviderNames.sui]: [
|
|
3080
|
+
Object.assign(Object.assign({}, basicWalletInfo['suiwallet']), { container: "div[role='dialog'].wkit-dialog__content" }),
|
|
3081
|
+
],
|
|
3082
|
+
},
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
urls: ['app.streamflow.finance'],
|
|
3086
|
+
walletsForProvider: {
|
|
3087
|
+
[IInjectedProviderNames.sui]: [
|
|
3088
|
+
Object.assign(Object.assign({}, basicWalletInfo['suiwallet']), { container: "div.w-full.sm\\:w-100" }),
|
|
3089
|
+
],
|
|
3090
|
+
},
|
|
3091
|
+
},
|
|
3092
|
+
{
|
|
3093
|
+
urls: ['farm.bucketprotocol.io'],
|
|
3094
|
+
walletsForProvider: {
|
|
3095
|
+
[IInjectedProviderNames.sui]: [
|
|
3096
|
+
Object.assign(Object.assign({}, basicWalletInfo['suiwallet']), { findIconAndName({ name }) {
|
|
3097
|
+
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect a Wallet from list');
|
|
3098
|
+
return modal && findIconAndNameByIcon('img[alt="Sui Wallet"]', 'auto-search-text', name, modal);
|
|
3099
|
+
} }),
|
|
3100
|
+
],
|
|
3101
|
+
},
|
|
3102
|
+
},
|
|
3103
|
+
{
|
|
3104
|
+
urls: ['stake.volosui.com'],
|
|
3105
|
+
walletsForProvider: {
|
|
3106
|
+
[IInjectedProviderNames.sui]: [
|
|
3107
|
+
Object.assign(Object.assign({}, basicWalletInfo['suiwallet']), { container: "div[role='dialog'].wkit-dialog__content" }),
|
|
3108
|
+
],
|
|
3109
|
+
},
|
|
3110
|
+
},
|
|
3111
|
+
{
|
|
3112
|
+
urls: ['app.houstonswap.io'],
|
|
3113
|
+
walletsForProvider: {
|
|
3114
|
+
[IInjectedProviderNames.aptos]: [
|
|
3115
|
+
Object.assign(Object.assign({}, basicWalletInfo['petra']), { container: 'div.relative.rounded-lg.bg-white.shadow' }),
|
|
3116
|
+
],
|
|
3117
|
+
},
|
|
3118
|
+
},
|
|
3119
|
+
{
|
|
3120
|
+
urls: ['app.eternalfinance.io'],
|
|
3121
|
+
walletsForProvider: {
|
|
3122
|
+
[IInjectedProviderNames.aptos]: [
|
|
3123
|
+
Object.assign(Object.assign({}, basicWalletInfo['petra']), { container: 'div.relative.rounded-lg.bg-white.shadow' }),
|
|
3124
|
+
],
|
|
3125
|
+
},
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
urls: ['launchpad.movegpt.io'],
|
|
3129
|
+
walletsForProvider: {
|
|
3130
|
+
[IInjectedProviderNames.aptos]: [
|
|
3131
|
+
Object.assign(Object.assign({}, basicWalletInfo['petra']), { findIconAndName({ name }) {
|
|
3132
|
+
var _a;
|
|
3133
|
+
const modal = getConnectWalletModalByTitle('div[role="dialog"]', 'Connect wallet');
|
|
3134
|
+
return (_a = (modal && findIconAndNameByName(modal, name, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
3135
|
+
} }),
|
|
3136
|
+
],
|
|
3137
|
+
},
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
urls: ['tsunami.finance'],
|
|
3141
|
+
walletsForProvider: {
|
|
3142
|
+
[IInjectedProviderNames.ethereum]: [metamaskForRainbowKit, walletConnectForRainbowKit],
|
|
3143
|
+
},
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
urls: ['portalbridge.com'],
|
|
3147
|
+
walletsForProvider: {
|
|
3148
|
+
[IInjectedProviderNames.aptos]: [
|
|
3149
|
+
Object.assign(Object.assign({}, basicWalletInfo['martian']), { findIconAndName({ name }) {
|
|
3150
|
+
var _a;
|
|
3151
|
+
const modal = getConnectWalletModalByTitle('div.MuiTypography-root.MuiTypography-body1.css-jeyoma-MuiTypography-root', 'Connect a wallet');
|
|
3152
|
+
return (_a = (modal && findIconAndNameByName(modal, name, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
3153
|
+
} }),
|
|
3154
|
+
],
|
|
3155
|
+
},
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
urls: ['app.aptoslaunch.io'],
|
|
3159
|
+
walletsForProvider: {
|
|
3160
|
+
[IInjectedProviderNames.aptos]: [
|
|
3161
|
+
Object.assign(Object.assign({}, basicWalletInfo['petra']), { findIconAndName(wallet) {
|
|
3162
|
+
return findIconAndNameByIcon(() => {
|
|
3163
|
+
var _a;
|
|
3164
|
+
return (_a = Array.from(document.querySelectorAll('img[alt="Petra icon"]')).filter((e) => isVisible(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3165
|
+
}, 'auto-search-text', wallet.name);
|
|
3166
|
+
} }),
|
|
3167
|
+
],
|
|
3168
|
+
},
|
|
3169
|
+
},
|
|
3170
|
+
{
|
|
3171
|
+
urls: ['app.animeswap.org'],
|
|
3172
|
+
walletsForProvider: {
|
|
3173
|
+
[IInjectedProviderNames.aptos]: [
|
|
3174
|
+
Object.assign(Object.assign({}, basicWalletInfo['petra']), { findIconAndName(wallet) {
|
|
3175
|
+
return findIconAndNameByIcon(() => {
|
|
3176
|
+
var _a;
|
|
3177
|
+
return (_a = Array.from(document.querySelectorAll('img[src*="./static/media/petra"]')).filter((e) => isVisible(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3178
|
+
}, 'auto-search-text', wallet.name);
|
|
3179
|
+
} }),
|
|
3180
|
+
],
|
|
3181
|
+
},
|
|
3182
|
+
},
|
|
3183
|
+
{
|
|
3184
|
+
urls: ['bluemove.net'],
|
|
3185
|
+
walletsForProvider: {
|
|
3186
|
+
[IInjectedProviderNames.aptos]: [
|
|
3187
|
+
Object.assign(Object.assign({}, basicWalletInfo['petra']), { findIconAndName({ name }) {
|
|
3188
|
+
var _a;
|
|
3189
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3190
|
+
},
|
|
3191
|
+
afterUpdate(textNode, iconNode) {
|
|
3192
|
+
if (iconNode) {
|
|
3193
|
+
iconNode.style.width = '28px';
|
|
3194
|
+
iconNode.style.height = '28px';
|
|
3195
|
+
}
|
|
3196
|
+
} }),
|
|
3197
|
+
],
|
|
3198
|
+
},
|
|
3199
|
+
},
|
|
2880
3200
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/inpage-providers-hub",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.17",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cross-inpage-provider"
|
|
6
6
|
],
|
|
@@ -28,27 +28,27 @@
|
|
|
28
28
|
"start": "tsc --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@onekeyfe/cross-inpage-provider-core": "2.2.
|
|
32
|
-
"@onekeyfe/cross-inpage-provider-types": "2.2.
|
|
33
|
-
"@onekeyfe/onekey-algo-provider": "2.2.
|
|
34
|
-
"@onekeyfe/onekey-alph-provider": "2.2.
|
|
35
|
-
"@onekeyfe/onekey-aptos-provider": "2.2.
|
|
36
|
-
"@onekeyfe/onekey-bfc-provider": "2.2.
|
|
37
|
-
"@onekeyfe/onekey-btc-provider": "2.2.
|
|
38
|
-
"@onekeyfe/onekey-cardano-provider": "2.2.
|
|
39
|
-
"@onekeyfe/onekey-conflux-provider": "2.2.
|
|
40
|
-
"@onekeyfe/onekey-cosmos-provider": "2.2.
|
|
41
|
-
"@onekeyfe/onekey-eth-provider": "2.2.
|
|
42
|
-
"@onekeyfe/onekey-neo-provider": "2.2.
|
|
43
|
-
"@onekeyfe/onekey-nostr-provider": "2.2.
|
|
44
|
-
"@onekeyfe/onekey-polkadot-provider": "2.2.
|
|
45
|
-
"@onekeyfe/onekey-private-provider": "2.2.
|
|
46
|
-
"@onekeyfe/onekey-scdo-provider": "2.2.
|
|
47
|
-
"@onekeyfe/onekey-solana-provider": "2.2.
|
|
48
|
-
"@onekeyfe/onekey-sui-provider": "2.2.
|
|
49
|
-
"@onekeyfe/onekey-ton-provider": "2.2.
|
|
50
|
-
"@onekeyfe/onekey-tron-provider": "2.2.
|
|
51
|
-
"@onekeyfe/onekey-webln-provider": "2.2.
|
|
31
|
+
"@onekeyfe/cross-inpage-provider-core": "2.2.17",
|
|
32
|
+
"@onekeyfe/cross-inpage-provider-types": "2.2.17",
|
|
33
|
+
"@onekeyfe/onekey-algo-provider": "2.2.17",
|
|
34
|
+
"@onekeyfe/onekey-alph-provider": "2.2.17",
|
|
35
|
+
"@onekeyfe/onekey-aptos-provider": "2.2.17",
|
|
36
|
+
"@onekeyfe/onekey-bfc-provider": "2.2.17",
|
|
37
|
+
"@onekeyfe/onekey-btc-provider": "2.2.17",
|
|
38
|
+
"@onekeyfe/onekey-cardano-provider": "2.2.17",
|
|
39
|
+
"@onekeyfe/onekey-conflux-provider": "2.2.17",
|
|
40
|
+
"@onekeyfe/onekey-cosmos-provider": "2.2.17",
|
|
41
|
+
"@onekeyfe/onekey-eth-provider": "2.2.17",
|
|
42
|
+
"@onekeyfe/onekey-neo-provider": "2.2.17",
|
|
43
|
+
"@onekeyfe/onekey-nostr-provider": "2.2.17",
|
|
44
|
+
"@onekeyfe/onekey-polkadot-provider": "2.2.17",
|
|
45
|
+
"@onekeyfe/onekey-private-provider": "2.2.17",
|
|
46
|
+
"@onekeyfe/onekey-scdo-provider": "2.2.17",
|
|
47
|
+
"@onekeyfe/onekey-solana-provider": "2.2.17",
|
|
48
|
+
"@onekeyfe/onekey-sui-provider": "2.2.17",
|
|
49
|
+
"@onekeyfe/onekey-ton-provider": "2.2.17",
|
|
50
|
+
"@onekeyfe/onekey-tron-provider": "2.2.17",
|
|
51
|
+
"@onekeyfe/onekey-webln-provider": "2.2.17",
|
|
52
52
|
"lodash-es": "^4.17.21",
|
|
53
53
|
"preact": "^10.25.1",
|
|
54
54
|
"web3": "^1.7.3"
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"@types/lodash-es": "^4.17.12",
|
|
58
58
|
"@types/node": "^20.12.7"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "398d84bed03f60876b6ea5760121f260eff5b82b"
|
|
61
61
|
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const hackConnectButton_1 = require("../hackConnectButton");
|
|
4
|
-
const cross_inpage_provider_types_1 = require("@onekeyfe/cross-inpage-provider-types");
|
|
5
|
-
const consts_1 = require("../consts");
|
|
6
|
-
exports.default = () => (0, hackConnectButton_1.hackConnectButton)({
|
|
7
|
-
urls: ['stake.lido.fi'],
|
|
8
|
-
providers: [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum],
|
|
9
|
-
replaceMethod(options) {
|
|
10
|
-
var _a;
|
|
11
|
-
const replaceFunc = ({ findName, icon, text, }) => {
|
|
12
|
-
var _a, _b;
|
|
13
|
-
const buttons = Array.from((_b = (_a = document.querySelector('div.idjqeC')) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button')) !== null && _b !== void 0 ? _b : []);
|
|
14
|
-
const findButton = buttons.find((button) => {
|
|
15
|
-
const span = button.querySelector('span > span > div');
|
|
16
|
-
if (span && span.innerText === findName) {
|
|
17
|
-
return button;
|
|
18
|
-
}
|
|
19
|
-
return undefined;
|
|
20
|
-
});
|
|
21
|
-
if (findButton) {
|
|
22
|
-
// change button text
|
|
23
|
-
const span = findButton.querySelector('div');
|
|
24
|
-
if (span) {
|
|
25
|
-
span.innerText = text;
|
|
26
|
-
}
|
|
27
|
-
// change icon
|
|
28
|
-
const imgContainer = findButton.querySelector('span > span >span');
|
|
29
|
-
if (imgContainer) {
|
|
30
|
-
(0, hackConnectButton_1.createNewImageToContainer)({
|
|
31
|
-
container: imgContainer,
|
|
32
|
-
icon: icon,
|
|
33
|
-
removeSvg: true,
|
|
34
|
-
onCreated(img) {
|
|
35
|
-
img.style.maxWidth = '48px';
|
|
36
|
-
img.style.maxHeight = '48px';
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
if ((_a = options === null || options === void 0 ? void 0 : options.providers) === null || _a === void 0 ? void 0 : _a.includes(cross_inpage_provider_types_1.IInjectedProviderNames.ethereum)) {
|
|
43
|
-
replaceFunc({
|
|
44
|
-
findName: 'MetaMask',
|
|
45
|
-
icon: consts_1.WALLET_CONNECT_INFO.metamask.icon,
|
|
46
|
-
text: consts_1.WALLET_CONNECT_INFO.metamask.text,
|
|
47
|
-
});
|
|
48
|
-
replaceFunc({
|
|
49
|
-
findName: 'WalletConnect',
|
|
50
|
-
icon: consts_1.WALLET_CONNECT_INFO.walletconnect.icon,
|
|
51
|
-
text: consts_1.WALLET_CONNECT_INFO.walletconnect.text,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const hackConnectButton_1 = require("../hackConnectButton");
|
|
4
|
-
const cross_inpage_provider_types_1 = require("@onekeyfe/cross-inpage-provider-types");
|
|
5
|
-
const consts_1 = require("../consts");
|
|
6
|
-
exports.default = () => (0, hackConnectButton_1.hackConnectButton)({
|
|
7
|
-
urls: ['stake.rocketpool.net'],
|
|
8
|
-
providers: [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum],
|
|
9
|
-
replaceMethod(options) {
|
|
10
|
-
var _a;
|
|
11
|
-
const replaceFunc = ({ findName, icon, text, }) => {
|
|
12
|
-
const walletBtnList = Array.from(document.querySelectorAll(`#headlessui-portal-root [role="dialog"] ul li`));
|
|
13
|
-
for (const walletBtn of walletBtnList) {
|
|
14
|
-
if ((walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.innerText) === findName) {
|
|
15
|
-
const textNode = walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.querySelector('div span');
|
|
16
|
-
if (textNode) {
|
|
17
|
-
textNode.innerText = text;
|
|
18
|
-
}
|
|
19
|
-
const img = walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.querySelector('img');
|
|
20
|
-
if (img) {
|
|
21
|
-
img.src = icon; //keep the original size and style
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
if ((_a = options === null || options === void 0 ? void 0 : options.providers) === null || _a === void 0 ? void 0 : _a.includes(cross_inpage_provider_types_1.IInjectedProviderNames.ethereum)) {
|
|
27
|
-
replaceFunc({
|
|
28
|
-
findName: 'Metamask',
|
|
29
|
-
icon: consts_1.WALLET_CONNECT_INFO.metamask.icon,
|
|
30
|
-
text: consts_1.WALLET_CONNECT_INFO.metamask.text,
|
|
31
|
-
});
|
|
32
|
-
replaceFunc({
|
|
33
|
-
findName: 'Wallet Connect',
|
|
34
|
-
icon: consts_1.WALLET_CONNECT_INFO.walletconnect.icon,
|
|
35
|
-
text: consts_1.WALLET_CONNECT_INFO.walletconnect.text,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const hackConnectButton_1 = require("../hackConnectButton");
|
|
7
|
-
const cross_inpage_provider_types_1 = require("@onekeyfe/cross-inpage-provider-types");
|
|
8
|
-
const consts_1 = require("../consts");
|
|
9
|
-
const utilsDomNodes_1 = __importDefault(require("../utils/utilsDomNodes"));
|
|
10
|
-
exports.default = () => (0, hackConnectButton_1.hackConnectButton)({
|
|
11
|
-
urls: ['app.solv.finance'],
|
|
12
|
-
providers: [cross_inpage_provider_types_1.IInjectedProviderNames.ethereum],
|
|
13
|
-
replaceMethod(options) {
|
|
14
|
-
var _a;
|
|
15
|
-
const replaceFunc = ({ findName, icon, text, }) => {
|
|
16
|
-
const walletBtnList = Array.from(document.querySelectorAll('[role="dialog"] > div:nth-child(2).overflow-y-overlay > div > div:nth-child(2) >div'));
|
|
17
|
-
for (const walletBtn of walletBtnList) {
|
|
18
|
-
if ((walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.innerText) === findName) {
|
|
19
|
-
const textNode = utilsDomNodes_1.default.findTextNode(walletBtn, findName);
|
|
20
|
-
textNode === null || textNode === void 0 ? void 0 : textNode.replaceWith(text);
|
|
21
|
-
const img = walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.querySelector(':scope > div:nth-child(1) > span> img');
|
|
22
|
-
if (img) {
|
|
23
|
-
img.src = icon;
|
|
24
|
-
img.style.width = '32px';
|
|
25
|
-
img.style.height = '32px';
|
|
26
|
-
img.style.minWidth = 'auto';
|
|
27
|
-
img.style.minHeight = 'auto';
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
if ((_a = options === null || options === void 0 ? void 0 : options.providers) === null || _a === void 0 ? void 0 : _a.includes(cross_inpage_provider_types_1.IInjectedProviderNames.ethereum)) {
|
|
33
|
-
replaceFunc({
|
|
34
|
-
findName: 'MetaMask',
|
|
35
|
-
icon: consts_1.WALLET_CONNECT_INFO.metamask.icon,
|
|
36
|
-
text: consts_1.WALLET_CONNECT_INFO.metamask.text,
|
|
37
|
-
});
|
|
38
|
-
replaceFunc({
|
|
39
|
-
findName: 'Wallet Connect',
|
|
40
|
-
icon: consts_1.WALLET_CONNECT_INFO.walletconnect.icon,
|
|
41
|
-
text: consts_1.WALLET_CONNECT_INFO.walletconnect.text,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { createNewImageToContainer, hackConnectButton } from '../hackConnectButton';
|
|
2
|
-
import { IInjectedProviderNames } from '@onekeyfe/cross-inpage-provider-types';
|
|
3
|
-
import { WALLET_CONNECT_INFO } from '../consts';
|
|
4
|
-
export default () => hackConnectButton({
|
|
5
|
-
urls: ['stake.lido.fi'],
|
|
6
|
-
providers: [IInjectedProviderNames.ethereum],
|
|
7
|
-
replaceMethod(options) {
|
|
8
|
-
var _a;
|
|
9
|
-
const replaceFunc = ({ findName, icon, text, }) => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
const buttons = Array.from((_b = (_a = document.querySelector('div.idjqeC')) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button')) !== null && _b !== void 0 ? _b : []);
|
|
12
|
-
const findButton = buttons.find((button) => {
|
|
13
|
-
const span = button.querySelector('span > span > div');
|
|
14
|
-
if (span && span.innerText === findName) {
|
|
15
|
-
return button;
|
|
16
|
-
}
|
|
17
|
-
return undefined;
|
|
18
|
-
});
|
|
19
|
-
if (findButton) {
|
|
20
|
-
// change button text
|
|
21
|
-
const span = findButton.querySelector('div');
|
|
22
|
-
if (span) {
|
|
23
|
-
span.innerText = text;
|
|
24
|
-
}
|
|
25
|
-
// change icon
|
|
26
|
-
const imgContainer = findButton.querySelector('span > span >span');
|
|
27
|
-
if (imgContainer) {
|
|
28
|
-
createNewImageToContainer({
|
|
29
|
-
container: imgContainer,
|
|
30
|
-
icon: icon,
|
|
31
|
-
removeSvg: true,
|
|
32
|
-
onCreated(img) {
|
|
33
|
-
img.style.maxWidth = '48px';
|
|
34
|
-
img.style.maxHeight = '48px';
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
if ((_a = options === null || options === void 0 ? void 0 : options.providers) === null || _a === void 0 ? void 0 : _a.includes(IInjectedProviderNames.ethereum)) {
|
|
41
|
-
replaceFunc({
|
|
42
|
-
findName: 'MetaMask',
|
|
43
|
-
icon: WALLET_CONNECT_INFO.metamask.icon,
|
|
44
|
-
text: WALLET_CONNECT_INFO.metamask.text,
|
|
45
|
-
});
|
|
46
|
-
replaceFunc({
|
|
47
|
-
findName: 'WalletConnect',
|
|
48
|
-
icon: WALLET_CONNECT_INFO.walletconnect.icon,
|
|
49
|
-
text: WALLET_CONNECT_INFO.walletconnect.text,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { hackConnectButton } from '../hackConnectButton';
|
|
2
|
-
import { IInjectedProviderNames } from '@onekeyfe/cross-inpage-provider-types';
|
|
3
|
-
import { WALLET_CONNECT_INFO } from '../consts';
|
|
4
|
-
export default () => hackConnectButton({
|
|
5
|
-
urls: ['stake.rocketpool.net'],
|
|
6
|
-
providers: [IInjectedProviderNames.ethereum],
|
|
7
|
-
replaceMethod(options) {
|
|
8
|
-
var _a;
|
|
9
|
-
const replaceFunc = ({ findName, icon, text, }) => {
|
|
10
|
-
const walletBtnList = Array.from(document.querySelectorAll(`#headlessui-portal-root [role="dialog"] ul li`));
|
|
11
|
-
for (const walletBtn of walletBtnList) {
|
|
12
|
-
if ((walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.innerText) === findName) {
|
|
13
|
-
const textNode = walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.querySelector('div span');
|
|
14
|
-
if (textNode) {
|
|
15
|
-
textNode.innerText = text;
|
|
16
|
-
}
|
|
17
|
-
const img = walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.querySelector('img');
|
|
18
|
-
if (img) {
|
|
19
|
-
img.src = icon; //keep the original size and style
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
if ((_a = options === null || options === void 0 ? void 0 : options.providers) === null || _a === void 0 ? void 0 : _a.includes(IInjectedProviderNames.ethereum)) {
|
|
25
|
-
replaceFunc({
|
|
26
|
-
findName: 'Metamask',
|
|
27
|
-
icon: WALLET_CONNECT_INFO.metamask.icon,
|
|
28
|
-
text: WALLET_CONNECT_INFO.metamask.text,
|
|
29
|
-
});
|
|
30
|
-
replaceFunc({
|
|
31
|
-
findName: 'Wallet Connect',
|
|
32
|
-
icon: WALLET_CONNECT_INFO.walletconnect.icon,
|
|
33
|
-
text: WALLET_CONNECT_INFO.walletconnect.text,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { hackConnectButton } from '../hackConnectButton';
|
|
2
|
-
import { IInjectedProviderNames } from '@onekeyfe/cross-inpage-provider-types';
|
|
3
|
-
import { WALLET_CONNECT_INFO } from '../consts';
|
|
4
|
-
import domUtils from '../utils/utilsDomNodes';
|
|
5
|
-
export default () => hackConnectButton({
|
|
6
|
-
urls: ['app.solv.finance'],
|
|
7
|
-
providers: [IInjectedProviderNames.ethereum],
|
|
8
|
-
replaceMethod(options) {
|
|
9
|
-
var _a;
|
|
10
|
-
const replaceFunc = ({ findName, icon, text, }) => {
|
|
11
|
-
const walletBtnList = Array.from(document.querySelectorAll('[role="dialog"] > div:nth-child(2).overflow-y-overlay > div > div:nth-child(2) >div'));
|
|
12
|
-
for (const walletBtn of walletBtnList) {
|
|
13
|
-
if ((walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.innerText) === findName) {
|
|
14
|
-
const textNode = domUtils.findTextNode(walletBtn, findName);
|
|
15
|
-
textNode === null || textNode === void 0 ? void 0 : textNode.replaceWith(text);
|
|
16
|
-
const img = walletBtn === null || walletBtn === void 0 ? void 0 : walletBtn.querySelector(':scope > div:nth-child(1) > span> img');
|
|
17
|
-
if (img) {
|
|
18
|
-
img.src = icon;
|
|
19
|
-
img.style.width = '32px';
|
|
20
|
-
img.style.height = '32px';
|
|
21
|
-
img.style.minWidth = 'auto';
|
|
22
|
-
img.style.minHeight = 'auto';
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
if ((_a = options === null || options === void 0 ? void 0 : options.providers) === null || _a === void 0 ? void 0 : _a.includes(IInjectedProviderNames.ethereum)) {
|
|
28
|
-
replaceFunc({
|
|
29
|
-
findName: 'MetaMask',
|
|
30
|
-
icon: WALLET_CONNECT_INFO.metamask.icon,
|
|
31
|
-
text: WALLET_CONNECT_INFO.metamask.text,
|
|
32
|
-
});
|
|
33
|
-
replaceFunc({
|
|
34
|
-
findName: 'Wallet Connect',
|
|
35
|
-
icon: WALLET_CONNECT_INFO.walletconnect.icon,
|
|
36
|
-
text: WALLET_CONNECT_INFO.walletconnect.text,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
});
|