OHLC oracle passes BigInt(crypto.decimal) to Fixed.div; decimal should be typed as bigint at the boundary to avoid repeated coercion bugs.
Location: src/services/oracles/ohlcoracle.mts:77
Code:
BigInt(crypto.decimal), // XXX crypto.decimal should be a bigint
Possible approach: Widen crypto metadata typings so decimal is already bigint (or validated at construction); remove BigInt() once types guarantee correctness.
Concerns: Numbers are highly optimized and are perfectly suitable to store "small" integers. Maybe Fixed.precision should be a number?
Shell
OHLC oracle passes
BigInt(crypto.decimal)toFixed.div;decimalshould be typed as bigint at the boundary to avoid repeated coercion bugs.Location:
src/services/oracles/ohlcoracle.mts:77Code:
Possible approach: Widen crypto metadata typings so
decimalis alreadybigint(or validated at construction); removeBigInt()once types guarantee correctness.Concerns: Numbers are highly optimized and are perfectly suitable to store "small" integers. Maybe
Fixed.precisionshould be a number?Shell