emmet.sdk
Version:
Emmet.Bridge SDK library
25 lines • 871 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEvmChainId = void 0;
const interfaces_1 = require("../../interfaces");
const EthreumConstants_1 = __importDefault(require("../../wallets/EthreumConstants"));
async function getEvmChainId() {
try {
if (interfaces_1.ethereum) {
const chainid = await interfaces_1.ethereum?.request({
method: EthreumConstants_1.default.ETH_CHAIN_ID
});
if (chainid)
return chainid;
}
}
catch (error) {
throw new Error("Failed to get the current chain ID");
}
return "";
}
exports.getEvmChainId = getEvmChainId;
//# sourceMappingURL=getEvmChainId.js.map