-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I've been using the BlockFrost adapter but noticed the code here, copied below and annotated for ease of reference:
public async getV2PoolByPair(
assetA: Asset,
assetB: Asset
): Promise<PoolV2.State | null> {
const [normalizedAssetA, normalizedAssetB] = normalizeAssets(
Asset.toString(assetA),
Asset.toString(assetB)
); // [string, string]
const { pools: allPools } = await this.getAllV2Pools();
return (
allPools.find(
(pool) =>
pool.assetA /* Asset */ === normalizedAssetA /* string */ && pool.assetB /* Asset */ === normalizedAssetB /* string */
) ?? null
);
}Is there some equality function or something that I'm missing here?
Metadata
Metadata
Assignees
Labels
No labels