emmet.sdk
Version:
Emmet.Bridge SDK library
21 lines • 712 B
JavaScript
;
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