UNPKG

emmet.sdk

Version:
21 lines 712 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCurrentWalletChain = void 0; async function getCurrentWalletChain() { try { if (typeof window?.ethereum !== 'undefined') { const chainIdHex = await window?.ethereum .request({ method: 'eth_chainId' }); return parseInt(chainIdHex, 16); } else { console.error('getCurrentWalletChain Error: EVM Wallet is not installed.'); } } catch (error) { console.error("getCurrentWalletChain Error:", error); } return 0; } exports.getCurrentWalletChain = getCurrentWalletChain; //# sourceMappingURL=getCurrentWalletChain.js.map