import { BaseHTTPAdapter } from "./baseAdapter";
/**
 * Fallback price adapter to unconditionally return 0 on all input addresses.
 * This adapter can be used as a last-resort to default to a token price of 0
 * in case all other adapters fail to resolve a token price.
 */
export class PriceFeed extends BaseHTTPAdapter {
    prices;
    constructor(prices = {}) {
        super("Default Adapter", "127.0.0.1", {});
        this.prices = prices;
    }
    async getPriceByAddress(address, currency) {
        const [price] = await this.getPricesByAddress([address], currency);
        return price;
    }
    getPricesByAddress(addresses, currency) {
        return Promise.resolve(addresses.map((address) => {
            return {
                address,
                price: this.prices[currency]?.[address] ?? 0,
                timestamp: 0,
            };
        }));
    }
}
//# sourceMappingURL=default.js.map