@onekeyfe/inpage-providers-hub 2.2.26 → 2.2.28
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.
|
@@ -3226,4 +3226,228 @@ exports.sitesConfig = [
|
|
|
3226
3226
|
],
|
|
3227
3227
|
},
|
|
3228
3228
|
},
|
|
3229
|
+
{
|
|
3230
|
+
urls: ['portal.bouncebit.io'],
|
|
3231
|
+
walletsForProvider: {
|
|
3232
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3233
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
3234
|
+
return (0, findIconAndName_1.findIconAndNameByIcon)(() => {
|
|
3235
|
+
var _a;
|
|
3236
|
+
return (_a = Array.from(document.querySelectorAll('img[src*="/images/wallet/metamask.png"]')).filter((e) => (0, utils_1.isVisible)(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3237
|
+
}, 'auto-search-text', wallet.name);
|
|
3238
|
+
} }),
|
|
3239
|
+
],
|
|
3240
|
+
},
|
|
3241
|
+
},
|
|
3242
|
+
{
|
|
3243
|
+
urls: ['obelisk.nodedao.com'],
|
|
3244
|
+
walletsForProvider: {
|
|
3245
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.btc]: [
|
|
3246
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
3247
|
+
var _a;
|
|
3248
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3249
|
+
} }),
|
|
3250
|
+
],
|
|
3251
|
+
},
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
urls: ['dapp.tokenbridge.rootstock.io', 'hive.bsquared.network', 'portal.bouncebit.io', 'www.lolik.com'],
|
|
3255
|
+
walletsForProvider: {
|
|
3256
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3257
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3258
|
+
var _a;
|
|
3259
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3260
|
+
} }),
|
|
3261
|
+
],
|
|
3262
|
+
},
|
|
3263
|
+
},
|
|
3264
|
+
{
|
|
3265
|
+
urls: ['bridge.metis.io'],
|
|
3266
|
+
walletsForProvider: {
|
|
3267
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3268
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3269
|
+
var _a;
|
|
3270
|
+
const modal = (0, utils_1.getConnectWalletModalByTitle)('div.sc-iGgWBj.jEkttQ', 'Connect your wallet');
|
|
3271
|
+
return (_a = (modal && (0, findIconAndName_1.findIconAndNameByName)(modal, /.*meta\s*mask$/i, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
3272
|
+
} }),
|
|
3273
|
+
],
|
|
3274
|
+
},
|
|
3275
|
+
},
|
|
3276
|
+
{
|
|
3277
|
+
urls: ['lista.org'],
|
|
3278
|
+
walletsForProvider: {
|
|
3279
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3280
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3281
|
+
var _a, _b;
|
|
3282
|
+
const modal = document.querySelector('div[role="alertdialog"]');
|
|
3283
|
+
const text = modal && (0, textUtils_1.findWalletTextByParent)(modal, name, []);
|
|
3284
|
+
const icon = (_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.querySelector('img');
|
|
3285
|
+
return (text && {
|
|
3286
|
+
textNode: text,
|
|
3287
|
+
iconNode: icon !== null && icon !== void 0 ? icon : null,
|
|
3288
|
+
});
|
|
3289
|
+
} }),
|
|
3290
|
+
],
|
|
3291
|
+
},
|
|
3292
|
+
},
|
|
3293
|
+
{
|
|
3294
|
+
urls: ['app.coffer.network'],
|
|
3295
|
+
walletsForProvider: {
|
|
3296
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.btc]: [
|
|
3297
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['unisat']), { container: () => (0, utils_1.getConnectWalletModalByTitle)('div.ant-web3-connect-modal-body.css-ccdg5a', 'Connect Wallet') }),
|
|
3298
|
+
],
|
|
3299
|
+
},
|
|
3300
|
+
},
|
|
3301
|
+
{
|
|
3302
|
+
urls: ['www.stakedao.org'],
|
|
3303
|
+
walletsForProvider: {
|
|
3304
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3305
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
3306
|
+
var _a;
|
|
3307
|
+
const iconNode = (_a = Array.from(document.querySelectorAll('img[alt="metamask wallet logo"]')).filter((e) => (0, utils_1.isVisible)(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3308
|
+
// 创建一个空的文本节点
|
|
3309
|
+
return iconNode ? {
|
|
3310
|
+
textNode: document.createTextNode(''),
|
|
3311
|
+
iconNode: iconNode
|
|
3312
|
+
} : null;
|
|
3313
|
+
} }),
|
|
3314
|
+
],
|
|
3315
|
+
},
|
|
3316
|
+
},
|
|
3317
|
+
{
|
|
3318
|
+
urls: ['www.babylon.magpiexyz.io', 'homora-v2.alphaventuredao.io', 'app.yei.finance', 'portal.bouncebit.io'],
|
|
3319
|
+
walletsForProvider: {
|
|
3320
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3321
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3322
|
+
var _a;
|
|
3323
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3324
|
+
} }),
|
|
3325
|
+
],
|
|
3326
|
+
},
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
urls: ['exsat.network'],
|
|
3330
|
+
mutationObserverOptions: {
|
|
3331
|
+
childList: true,
|
|
3332
|
+
subtree: true,
|
|
3333
|
+
attributes: true,
|
|
3334
|
+
},
|
|
3335
|
+
constraintMap: {
|
|
3336
|
+
icon: [imgUtils_1.isWalletIconLessEqualThan],
|
|
3337
|
+
text: [],
|
|
3338
|
+
},
|
|
3339
|
+
walletsForProvider: {
|
|
3340
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.ethereum]: [
|
|
3341
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3342
|
+
var _a;
|
|
3343
|
+
const modal = document.querySelector('.ant-modal-body');
|
|
3344
|
+
return (_a = (modal && (0, findIconAndName_1.findIconAndNameByName)(modal, name, 'auto-search-icon', {
|
|
3345
|
+
icon: [imgUtils_1.isWalletIconLessEqualThan],
|
|
3346
|
+
text: []
|
|
3347
|
+
}))) !== null && _a !== void 0 ? _a : null;
|
|
3348
|
+
} }),
|
|
3349
|
+
],
|
|
3350
|
+
},
|
|
3351
|
+
},
|
|
3352
|
+
{
|
|
3353
|
+
urls: ['app.pluto.so'],
|
|
3354
|
+
walletsForProvider: {
|
|
3355
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.solana]: [
|
|
3356
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['phantom']), { findIconAndName(wallet) {
|
|
3357
|
+
return (0, findIconAndName_1.findIconAndNameByIcon)(() => {
|
|
3358
|
+
var _a;
|
|
3359
|
+
return (_a = Array.from(document.querySelectorAll('img[alt="phantom wallet"]')).filter((e) => (0, utils_1.isVisible)(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3360
|
+
}, 'auto-search-text', wallet.name);
|
|
3361
|
+
} }),
|
|
3362
|
+
],
|
|
3363
|
+
},
|
|
3364
|
+
},
|
|
3365
|
+
{
|
|
3366
|
+
urls: ['app.cega.fi', 'parrot.fi', 'app.rate-x.io', 'app.meteora.ag', 'app.fragmetric.xyz', 'app.apricot.one',
|
|
3367
|
+
'dex.saros.xyz', 'tulip.garden'],
|
|
3368
|
+
walletsForProvider: {
|
|
3369
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.solana]: [
|
|
3370
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['phantom']), { findIconAndName({ name }) {
|
|
3371
|
+
var _a;
|
|
3372
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3373
|
+
} }),
|
|
3374
|
+
],
|
|
3375
|
+
},
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
urls: ['app.adrena.xyz'],
|
|
3379
|
+
walletsForProvider: {
|
|
3380
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.solana]: [
|
|
3381
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['phantom']), { findIconAndName({ name }) {
|
|
3382
|
+
const textNodes = utilsDomNodes_1.default.findTextNode(document.body, name, 'all');
|
|
3383
|
+
const textNode = textNodes === null || textNodes === void 0 ? void 0 : textNodes.find(node => node.parentElement && (0, utils_1.isVisible)(node.parentElement));
|
|
3384
|
+
return (textNode === null || textNode === void 0 ? void 0 : textNode.parentElement) ? {
|
|
3385
|
+
textNode: textNode,
|
|
3386
|
+
iconNode: textNode.parentElement
|
|
3387
|
+
} : null;
|
|
3388
|
+
} }),
|
|
3389
|
+
],
|
|
3390
|
+
},
|
|
3391
|
+
},
|
|
3392
|
+
{
|
|
3393
|
+
urls: ['swap.pump.fun'],
|
|
3394
|
+
walletsForProvider: {
|
|
3395
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.solana]: [
|
|
3396
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['phantom']), { findIconAndName({ name }) {
|
|
3397
|
+
var _a;
|
|
3398
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3399
|
+
},
|
|
3400
|
+
afterUpdate(textNode) {
|
|
3401
|
+
if (textNode) {
|
|
3402
|
+
textNode.textContent = 'Onekey&Phantom';
|
|
3403
|
+
}
|
|
3404
|
+
} }),
|
|
3405
|
+
],
|
|
3406
|
+
},
|
|
3407
|
+
},
|
|
3408
|
+
{
|
|
3409
|
+
urls: ['goatswap.xyz'],
|
|
3410
|
+
walletsForProvider: {
|
|
3411
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.solana]: [
|
|
3412
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['phantom']), { findIconAndName(wallet) {
|
|
3413
|
+
return (0, findIconAndName_1.findIconAndNameByIcon)(() => {
|
|
3414
|
+
var _a;
|
|
3415
|
+
return (_a = Array.from(document.querySelectorAll('img[alt="Phantom icon"]')).filter((e) => (0, utils_1.isVisible)(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3416
|
+
}, 'auto-search-text', wallet.name);
|
|
3417
|
+
} }),
|
|
3418
|
+
],
|
|
3419
|
+
},
|
|
3420
|
+
},
|
|
3421
|
+
{
|
|
3422
|
+
urls: ['projectlarix.com'],
|
|
3423
|
+
walletsForProvider: {
|
|
3424
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.solana]: [
|
|
3425
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['phantom']), { findIconAndName(wallet) {
|
|
3426
|
+
return (0, findIconAndName_1.findIconAndNameByIcon)(() => {
|
|
3427
|
+
var _a;
|
|
3428
|
+
return (_a = Array.from(document.querySelectorAll('img[src*="/img/pop_wallet_logo_phantom"]')).filter((e) => (0, utils_1.isVisible)(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3429
|
+
}, 'auto-search-text', wallet.name);
|
|
3430
|
+
} }),
|
|
3431
|
+
],
|
|
3432
|
+
},
|
|
3433
|
+
},
|
|
3434
|
+
{
|
|
3435
|
+
urls: ['dollar.noble.xyz', 'points.noble.xyz'],
|
|
3436
|
+
walletsForProvider: {
|
|
3437
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.cosmos]: [
|
|
3438
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['keplr']), { name: /keplr/i, container: () => (0, utils_1.getConnectWalletModalByTitle)('div[role="dialog"]', 'Connect a wallet') }),
|
|
3439
|
+
],
|
|
3440
|
+
},
|
|
3441
|
+
},
|
|
3442
|
+
{
|
|
3443
|
+
urls: ['express.noble.xyz'],
|
|
3444
|
+
walletsForProvider: {
|
|
3445
|
+
[cross_inpage_provider_types_1.IInjectedProviderNames.cosmos]: [
|
|
3446
|
+
Object.assign(Object.assign({}, exports.basicWalletInfo['keplr']), { findIconAndName({ name }) {
|
|
3447
|
+
var _a;
|
|
3448
|
+
return (_a = (0, findIconAndName_1.findIconAndNameByName)(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3449
|
+
} }),
|
|
3450
|
+
],
|
|
3451
|
+
},
|
|
3452
|
+
},
|
|
3229
3453
|
];
|
|
@@ -113,7 +113,7 @@ function injectWeb3Provider({ showFloatingButton = false, } = {}) {
|
|
|
113
113
|
// Override MetaMask EIP6963 Provider
|
|
114
114
|
if ((0, cross_inpage_provider_core_1.checkWalletSwitchEnable)()) {
|
|
115
115
|
(0, onekey_eth_provider_1.registerEIP6963Provider)({
|
|
116
|
-
uuid:
|
|
116
|
+
uuid: onekey_eth_provider_1.METAMASK_UUID,
|
|
117
117
|
name: 'MetaMask',
|
|
118
118
|
rdns: 'io.metamask',
|
|
119
119
|
image: consts_1.WALLET_CONNECT_INFO.metamask.icon,
|
|
@@ -3220,4 +3220,228 @@ export const sitesConfig = [
|
|
|
3220
3220
|
],
|
|
3221
3221
|
},
|
|
3222
3222
|
},
|
|
3223
|
+
{
|
|
3224
|
+
urls: ['portal.bouncebit.io'],
|
|
3225
|
+
walletsForProvider: {
|
|
3226
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3227
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
3228
|
+
return findIconAndNameByIcon(() => {
|
|
3229
|
+
var _a;
|
|
3230
|
+
return (_a = Array.from(document.querySelectorAll('img[src*="/images/wallet/metamask.png"]')).filter((e) => isVisible(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3231
|
+
}, 'auto-search-text', wallet.name);
|
|
3232
|
+
} }),
|
|
3233
|
+
],
|
|
3234
|
+
},
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
urls: ['obelisk.nodedao.com'],
|
|
3238
|
+
walletsForProvider: {
|
|
3239
|
+
[IInjectedProviderNames.btc]: [
|
|
3240
|
+
Object.assign(Object.assign({}, basicWalletInfo['unisat']), { findIconAndName({ name }) {
|
|
3241
|
+
var _a;
|
|
3242
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3243
|
+
} }),
|
|
3244
|
+
],
|
|
3245
|
+
},
|
|
3246
|
+
},
|
|
3247
|
+
{
|
|
3248
|
+
urls: ['dapp.tokenbridge.rootstock.io', 'hive.bsquared.network', 'portal.bouncebit.io', 'www.lolik.com'],
|
|
3249
|
+
walletsForProvider: {
|
|
3250
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3251
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3252
|
+
var _a;
|
|
3253
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3254
|
+
} }),
|
|
3255
|
+
],
|
|
3256
|
+
},
|
|
3257
|
+
},
|
|
3258
|
+
{
|
|
3259
|
+
urls: ['bridge.metis.io'],
|
|
3260
|
+
walletsForProvider: {
|
|
3261
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3262
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3263
|
+
var _a;
|
|
3264
|
+
const modal = getConnectWalletModalByTitle('div.sc-iGgWBj.jEkttQ', 'Connect your wallet');
|
|
3265
|
+
return (_a = (modal && findIconAndNameByName(modal, /.*meta\s*mask$/i, 'auto-search-icon'))) !== null && _a !== void 0 ? _a : null;
|
|
3266
|
+
} }),
|
|
3267
|
+
],
|
|
3268
|
+
},
|
|
3269
|
+
},
|
|
3270
|
+
{
|
|
3271
|
+
urls: ['lista.org'],
|
|
3272
|
+
walletsForProvider: {
|
|
3273
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3274
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3275
|
+
var _a, _b;
|
|
3276
|
+
const modal = document.querySelector('div[role="alertdialog"]');
|
|
3277
|
+
const text = modal && findWalletTextByParent(modal, name, []);
|
|
3278
|
+
const icon = (_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.querySelector('img');
|
|
3279
|
+
return (text && {
|
|
3280
|
+
textNode: text,
|
|
3281
|
+
iconNode: icon !== null && icon !== void 0 ? icon : null,
|
|
3282
|
+
});
|
|
3283
|
+
} }),
|
|
3284
|
+
],
|
|
3285
|
+
},
|
|
3286
|
+
},
|
|
3287
|
+
{
|
|
3288
|
+
urls: ['app.coffer.network'],
|
|
3289
|
+
walletsForProvider: {
|
|
3290
|
+
[IInjectedProviderNames.btc]: [
|
|
3291
|
+
Object.assign(Object.assign({}, basicWalletInfo['unisat']), { container: () => getConnectWalletModalByTitle('div.ant-web3-connect-modal-body.css-ccdg5a', 'Connect Wallet') }),
|
|
3292
|
+
],
|
|
3293
|
+
},
|
|
3294
|
+
},
|
|
3295
|
+
{
|
|
3296
|
+
urls: ['www.stakedao.org'],
|
|
3297
|
+
walletsForProvider: {
|
|
3298
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3299
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName(wallet) {
|
|
3300
|
+
var _a;
|
|
3301
|
+
const iconNode = (_a = Array.from(document.querySelectorAll('img[alt="metamask wallet logo"]')).filter((e) => isVisible(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3302
|
+
// 创建一个空的文本节点
|
|
3303
|
+
return iconNode ? {
|
|
3304
|
+
textNode: document.createTextNode(''),
|
|
3305
|
+
iconNode: iconNode
|
|
3306
|
+
} : null;
|
|
3307
|
+
} }),
|
|
3308
|
+
],
|
|
3309
|
+
},
|
|
3310
|
+
},
|
|
3311
|
+
{
|
|
3312
|
+
urls: ['www.babylon.magpiexyz.io', 'homora-v2.alphaventuredao.io', 'app.yei.finance', 'portal.bouncebit.io'],
|
|
3313
|
+
walletsForProvider: {
|
|
3314
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3315
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3316
|
+
var _a;
|
|
3317
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3318
|
+
} }),
|
|
3319
|
+
],
|
|
3320
|
+
},
|
|
3321
|
+
},
|
|
3322
|
+
{
|
|
3323
|
+
urls: ['exsat.network'],
|
|
3324
|
+
mutationObserverOptions: {
|
|
3325
|
+
childList: true,
|
|
3326
|
+
subtree: true,
|
|
3327
|
+
attributes: true,
|
|
3328
|
+
},
|
|
3329
|
+
constraintMap: {
|
|
3330
|
+
icon: [isWalletIconLessEqualThan],
|
|
3331
|
+
text: [],
|
|
3332
|
+
},
|
|
3333
|
+
walletsForProvider: {
|
|
3334
|
+
[IInjectedProviderNames.ethereum]: [
|
|
3335
|
+
Object.assign(Object.assign({}, basicWalletInfo['metamask']), { findIconAndName({ name }) {
|
|
3336
|
+
var _a;
|
|
3337
|
+
const modal = document.querySelector('.ant-modal-body');
|
|
3338
|
+
return (_a = (modal && findIconAndNameByName(modal, name, 'auto-search-icon', {
|
|
3339
|
+
icon: [isWalletIconLessEqualThan],
|
|
3340
|
+
text: []
|
|
3341
|
+
}))) !== null && _a !== void 0 ? _a : null;
|
|
3342
|
+
} }),
|
|
3343
|
+
],
|
|
3344
|
+
},
|
|
3345
|
+
},
|
|
3346
|
+
{
|
|
3347
|
+
urls: ['app.pluto.so'],
|
|
3348
|
+
walletsForProvider: {
|
|
3349
|
+
[IInjectedProviderNames.solana]: [
|
|
3350
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { findIconAndName(wallet) {
|
|
3351
|
+
return findIconAndNameByIcon(() => {
|
|
3352
|
+
var _a;
|
|
3353
|
+
return (_a = Array.from(document.querySelectorAll('img[alt="phantom wallet"]')).filter((e) => isVisible(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3354
|
+
}, 'auto-search-text', wallet.name);
|
|
3355
|
+
} }),
|
|
3356
|
+
],
|
|
3357
|
+
},
|
|
3358
|
+
},
|
|
3359
|
+
{
|
|
3360
|
+
urls: ['app.cega.fi', 'parrot.fi', 'app.rate-x.io', 'app.meteora.ag', 'app.fragmetric.xyz', 'app.apricot.one',
|
|
3361
|
+
'dex.saros.xyz', 'tulip.garden'],
|
|
3362
|
+
walletsForProvider: {
|
|
3363
|
+
[IInjectedProviderNames.solana]: [
|
|
3364
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { findIconAndName({ name }) {
|
|
3365
|
+
var _a;
|
|
3366
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3367
|
+
} }),
|
|
3368
|
+
],
|
|
3369
|
+
},
|
|
3370
|
+
},
|
|
3371
|
+
{
|
|
3372
|
+
urls: ['app.adrena.xyz'],
|
|
3373
|
+
walletsForProvider: {
|
|
3374
|
+
[IInjectedProviderNames.solana]: [
|
|
3375
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { findIconAndName({ name }) {
|
|
3376
|
+
const textNodes = domUtils.findTextNode(document.body, name, 'all');
|
|
3377
|
+
const textNode = textNodes === null || textNodes === void 0 ? void 0 : textNodes.find(node => node.parentElement && isVisible(node.parentElement));
|
|
3378
|
+
return (textNode === null || textNode === void 0 ? void 0 : textNode.parentElement) ? {
|
|
3379
|
+
textNode: textNode,
|
|
3380
|
+
iconNode: textNode.parentElement
|
|
3381
|
+
} : null;
|
|
3382
|
+
} }),
|
|
3383
|
+
],
|
|
3384
|
+
},
|
|
3385
|
+
},
|
|
3386
|
+
{
|
|
3387
|
+
urls: ['swap.pump.fun'],
|
|
3388
|
+
walletsForProvider: {
|
|
3389
|
+
[IInjectedProviderNames.solana]: [
|
|
3390
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { findIconAndName({ name }) {
|
|
3391
|
+
var _a;
|
|
3392
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3393
|
+
},
|
|
3394
|
+
afterUpdate(textNode) {
|
|
3395
|
+
if (textNode) {
|
|
3396
|
+
textNode.textContent = 'Onekey&Phantom';
|
|
3397
|
+
}
|
|
3398
|
+
} }),
|
|
3399
|
+
],
|
|
3400
|
+
},
|
|
3401
|
+
},
|
|
3402
|
+
{
|
|
3403
|
+
urls: ['goatswap.xyz'],
|
|
3404
|
+
walletsForProvider: {
|
|
3405
|
+
[IInjectedProviderNames.solana]: [
|
|
3406
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { findIconAndName(wallet) {
|
|
3407
|
+
return findIconAndNameByIcon(() => {
|
|
3408
|
+
var _a;
|
|
3409
|
+
return (_a = Array.from(document.querySelectorAll('img[alt="Phantom icon"]')).filter((e) => isVisible(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3410
|
+
}, 'auto-search-text', wallet.name);
|
|
3411
|
+
} }),
|
|
3412
|
+
],
|
|
3413
|
+
},
|
|
3414
|
+
},
|
|
3415
|
+
{
|
|
3416
|
+
urls: ['projectlarix.com'],
|
|
3417
|
+
walletsForProvider: {
|
|
3418
|
+
[IInjectedProviderNames.solana]: [
|
|
3419
|
+
Object.assign(Object.assign({}, basicWalletInfo['phantom']), { findIconAndName(wallet) {
|
|
3420
|
+
return findIconAndNameByIcon(() => {
|
|
3421
|
+
var _a;
|
|
3422
|
+
return (_a = Array.from(document.querySelectorAll('img[src*="/img/pop_wallet_logo_phantom"]')).filter((e) => isVisible(e))) === null || _a === void 0 ? void 0 : _a[0];
|
|
3423
|
+
}, 'auto-search-text', wallet.name);
|
|
3424
|
+
} }),
|
|
3425
|
+
],
|
|
3426
|
+
},
|
|
3427
|
+
},
|
|
3428
|
+
{
|
|
3429
|
+
urls: ['dollar.noble.xyz', 'points.noble.xyz'],
|
|
3430
|
+
walletsForProvider: {
|
|
3431
|
+
[IInjectedProviderNames.cosmos]: [
|
|
3432
|
+
Object.assign(Object.assign({}, basicWalletInfo['keplr']), { name: /keplr/i, container: () => getConnectWalletModalByTitle('div[role="dialog"]', 'Connect a wallet') }),
|
|
3433
|
+
],
|
|
3434
|
+
},
|
|
3435
|
+
},
|
|
3436
|
+
{
|
|
3437
|
+
urls: ['express.noble.xyz'],
|
|
3438
|
+
walletsForProvider: {
|
|
3439
|
+
[IInjectedProviderNames.cosmos]: [
|
|
3440
|
+
Object.assign(Object.assign({}, basicWalletInfo['keplr']), { findIconAndName({ name }) {
|
|
3441
|
+
var _a;
|
|
3442
|
+
return (_a = findIconAndNameByName(document.body, name, 'auto-search-icon')) !== null && _a !== void 0 ? _a : null;
|
|
3443
|
+
} }),
|
|
3444
|
+
],
|
|
3445
|
+
},
|
|
3446
|
+
},
|
|
3223
3447
|
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProviderEthereum, shimWeb3, registerEIP6963Provider, MetaMaskSDK, } from '@onekeyfe/onekey-eth-provider';
|
|
1
|
+
import { ProviderEthereum, shimWeb3, registerEIP6963Provider, MetaMaskSDK, METAMASK_UUID } from '@onekeyfe/onekey-eth-provider';
|
|
2
2
|
import { ProviderPrivate } from '@onekeyfe/onekey-private-provider';
|
|
3
3
|
import { ProviderSolana, registerSolanaWallet } from '@onekeyfe/onekey-solana-provider';
|
|
4
4
|
import { ProviderAptosMartian, registerAptosWallet, } from '@onekeyfe/onekey-aptos-provider';
|
|
@@ -110,7 +110,7 @@ function injectWeb3Provider({ showFloatingButton = false, } = {}) {
|
|
|
110
110
|
// Override MetaMask EIP6963 Provider
|
|
111
111
|
if (checkWalletSwitchEnable()) {
|
|
112
112
|
registerEIP6963Provider({
|
|
113
|
-
uuid:
|
|
113
|
+
uuid: METAMASK_UUID,
|
|
114
114
|
name: 'MetaMask',
|
|
115
115
|
rdns: 'io.metamask',
|
|
116
116
|
image: WALLET_CONNECT_INFO.metamask.icon,
|
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.28",
|
|
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.28",
|
|
32
|
+
"@onekeyfe/cross-inpage-provider-types": "2.2.28",
|
|
33
|
+
"@onekeyfe/onekey-algo-provider": "2.2.28",
|
|
34
|
+
"@onekeyfe/onekey-alph-provider": "2.2.28",
|
|
35
|
+
"@onekeyfe/onekey-aptos-provider": "2.2.28",
|
|
36
|
+
"@onekeyfe/onekey-bfc-provider": "2.2.28",
|
|
37
|
+
"@onekeyfe/onekey-btc-provider": "2.2.28",
|
|
38
|
+
"@onekeyfe/onekey-cardano-provider": "2.2.28",
|
|
39
|
+
"@onekeyfe/onekey-conflux-provider": "2.2.28",
|
|
40
|
+
"@onekeyfe/onekey-cosmos-provider": "2.2.28",
|
|
41
|
+
"@onekeyfe/onekey-eth-provider": "2.2.28",
|
|
42
|
+
"@onekeyfe/onekey-neo-provider": "2.2.28",
|
|
43
|
+
"@onekeyfe/onekey-nostr-provider": "2.2.28",
|
|
44
|
+
"@onekeyfe/onekey-polkadot-provider": "2.2.28",
|
|
45
|
+
"@onekeyfe/onekey-private-provider": "2.2.28",
|
|
46
|
+
"@onekeyfe/onekey-scdo-provider": "2.2.28",
|
|
47
|
+
"@onekeyfe/onekey-solana-provider": "2.2.28",
|
|
48
|
+
"@onekeyfe/onekey-sui-provider": "2.2.28",
|
|
49
|
+
"@onekeyfe/onekey-ton-provider": "2.2.28",
|
|
50
|
+
"@onekeyfe/onekey-tron-provider": "2.2.28",
|
|
51
|
+
"@onekeyfe/onekey-webln-provider": "2.2.28",
|
|
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": "473ece52d08eeb9eed490a3172fad5f954338800"
|
|
61
61
|
}
|