Resolve a coin's USD price: pythPrice when usable, else coingeckoPrice,
else null. Non-positive and non-finite values are unusable. Pegged coins
([PEGGED_COIN_TYPES]) take pythPrice only, zero included, and never use
CoinGecko. A truthiness check on pythPrice must never gate this: the
runtime value is a number, so a pegged 0 is falsy and would silently
fall through to the market quote.
The peg check reads coinMetadata.coinType, not the map key the caller
looked the entry up by. The two differ for the long-form SUI alias, which
is not pegged.
Resolve a coin's USD price:
pythPricewhen usable, elsecoingeckoPrice, elsenull. Non-positive and non-finite values are unusable. Pegged coins ([PEGGED_COIN_TYPES]) takepythPriceonly, zero included, and never use CoinGecko. A truthiness check onpythPricemust never gate this: the runtime value is a number, so a pegged0is falsy and would silently fall through to the market quote.The peg check reads
coinMetadata.coinType, not the map key the caller looked the entry up by. The two differ for the long-form SUI alias, which is not pegged.