In market.ts there is a quite a bit of logic that retrieves the price from an event https://github.com/project-serum/serum-js/blob/c4ec583a678bd387bdb5c1887ebd8d5a5c454982/src/market.ts#L521
is it basically equivalent to priceLotsToNumber(event.orderId.ushrn(64)) or we should not rely on order id encoding to retrieve the order price? I'm asking as already using that logic to retreive price for request queue items and not 100% sure if that is correct or not.
In
market.ts
there is a quite a bit of logic that retrieves the price from an event https://github.com/project-serum/serum-js/blob/c4ec583a678bd387bdb5c1887ebd8d5a5c454982/src/market.ts#L521 is it basically equivalent topriceLotsToNumber(event.orderId.ushrn(64))
or we should not rely on order id encoding to retrieve the order price? I'm asking as already using that logic to retreive price for request queue items and not 100% sure if that is correct or not....also is it necessary to check
event.nativeQuantityPaid.gtn(0)
at https://github.com/project-serum/serum-js/blob/c4ec583a678bd387bdb5c1887ebd8d5a5c454982/src/market.ts#L509 can there be a fill that has nativeQuantityPaid set to 0? Thanks