UNPKG

@thirdweb-dev/wallets

Version:

<p align="center"> <br /> <a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/legacy_packages/sdk/logo.svg?raw=true" width="200" alt=""/></a> <br /> </p> <h1 align="center">thirdweb Wallet SDK</h1> <p align="center"> <a h

52 lines (47 loc) 1.73 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var evm_connectors_injected_dist_thirdwebDevWalletsEvmConnectorsInjected = require('../../injected/dist/thirdweb-dev-wallets-evm-connectors-injected.cjs.prod.js'); var assertWindowEthereum = require('../../../../dist/assertWindowEthereum-941010de.cjs.prod.js'); require('../../../../dist/defineProperty-b749763b.cjs.prod.js'); require('../../../../dist/WagmiConnector-17577fd3.cjs.prod.js'); require('@thirdweb-dev/chains'); require('eventemitter3'); require('../../../../dist/errors-8b161b04.cjs.prod.js'); require('../../../../dist/url-8b7f19db.cjs.prod.js'); require('ethers'); require('../../../../dist/normalizeChainId-dc975fa1.cjs.prod.js'); class ImTokenConnector extends evm_connectors_injected_dist_thirdwebDevWalletsEvmConnectorsInjected.InjectedConnector { constructor(arg) { const defaultOptions = { name: "imToken", getProvider() { function getReady(ethereum) { const isImToken = !!ethereum?.isImToken; if (!isImToken) { return; } return ethereum; } if (typeof window === "undefined") { return; } if (assertWindowEthereum.assertWindowEthereum(globalThis.window)) { if (globalThis.window.ethereum?.providers) { return globalThis.window.ethereum.providers.find(getReady); } return getReady(globalThis.window.ethereum); } } }; const options = { ...defaultOptions, ...arg.options }; super({ chains: arg.chains, options, connectorStorage: arg.connectorStorage }); } } exports.ImTokenConnector = ImTokenConnector;