import { transactionErrorCodes as e } from "../../error-handling/error-codes.constants.mjs";
import { getAmountInToken as t } from "../web3/etherFunctions.mjs";
import { getERC20Token as n } from "../utils/erc20tokenFunctions.mjs";
import { getTokenPrices as r } from "../../API/getTokenPrice.mjs";
import "../../error-handling/index.mjs";
import { KYC_LIMIT as i } from "../../constants/kyc.constants.mjs";
import "../../constants/index.mjs";
import "../utils/index.mjs";
import "../../API/index.mjs";
import "../web3/index.mjs";
//#region libs/shared/common/src/functions/kyc/checkTokenLimitsUSD.ts
var a = async (a, o, s) => {
	if (!o.length || !s.length) return !1;
	let c = o.map((e) => n(e, a)), l = [];
	try {
		l = (await r(a, o)).prices || [];
	} catch {
		throw Error(e.KYC_PRICE_FETCH_FAILED);
	}
	for (let e = 0; e < o.length; e++) {
		let n = c[e], r = s[e], a = l[e];
		if (!n || r === 0n || !a) continue;
		let o = t(n, r);
		if (Number(o) * a > i) return !0;
	}
	return !1;
};
//#endregion
export { a as checkTokenLimitsUSD };
