var e = new class {
	tokenRegistry;
	constructor() {
		this.tokenRegistry = [];
	}
	setTokensFromCache(e) {
		this.tokenRegistry = e;
	}
	getCustomTokens(e) {
		return this.tokenRegistry.filter((t) => t.chainId === e);
	}
	tokenExists(e, t) {
		return e.find((e) => e.erc20TokenAddress === t.erc20TokenAddress || e.symbol === t.symbol || e.name === t.name);
	}
	addCustomToken(e) {
		let { chainId: t } = e, n = this.getCustomTokens(t);
		this.tokenExists(n, e) || this.tokenRegistry.push(e);
	}
	removeCustomToken(e) {
		let { chainId: t } = e, n = this.getCustomTokens(t).filter((t) => t.erc20TokenAddress !== e.erc20TokenAddress);
		this.tokenRegistry = n;
	}
}();
//#endregion
export { e as customTokenRegistry };
