import { isNFTToken as e } from "../utils/erc20tokenFunctions.mjs";
import { caseInsensitiveEqual as t } from "../utils/caseInsensitive.utils.mjs";
import { Logger as n } from "../../error-handling/logger.mjs";
import { getPublicBalance as r } from "../utils/publicBalance.utils.mjs";
import "../utils/index.mjs";
//#region libs/shared/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.ts
var i = async (i, a, o, s) => {
	try {
		return (await Promise.all(i.filter((n) => !t(n.token.erc20TokenAddress, a) && !e(n.token)).map(async (e) => {
			let t = await r(s, o, e.token);
			return {
				token: e.token,
				balance: t?.balance || 0n
			};
		}))).filter(({ balance: e }) => e > 0n);
	} catch (e) {
		return n.error("Error getting tokens to deposit back", e), [];
	}
};
//#endregion
export { i as getTokensToDepositBack };
