UNPKG

emmet.sdk

Version:
25 lines 866 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getEvmBalance = void 0; const EthreumConstants_1 = __importDefault(require("../../wallets/EthreumConstants")); async function getEvmBalance(account, ethereum) { try { if (ethereum) { const response = await ethereum.request({ method: EthreumConstants_1.default.ETH_GET_BALANCE, params: [account, "latest"], }); if (response) return response; } } catch (error) { throw new Error("Failed to get the native coin balance"); } return ""; } exports.getEvmBalance = getEvmBalance; //# sourceMappingURL=getEvmBalance.js.map