File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -151,9 +151,15 @@ export default class Batch {
151151 update ( llmBatch : AUCT . BatchSnapshotResponse . AsObject ) {
152152 this . batchId = hex ( llmBatch . batchId ) ;
153153 this . prevBatchId = hex ( llmBatch . prevBatchId ) ;
154- this . clearingPriceRate = llmBatch . clearingPriceRate ;
155154 this . batchTxId = llmBatch . batchTxId ;
156155 this . batchTxFeeRateSatPerKw = llmBatch . batchTxFeeRateSatPerKw ;
156+ // temporary fix to keep a batch level rate. Now that pool supports multiple
157+ // durations, the rate per matched order will vary. The rate for orders with
158+ // the same duration should be the same. In the future, we should group orders
159+ // by their duration so they can be displayed in separate charts
160+ if ( llmBatch . matchedOrdersList . length > 0 ) {
161+ this . clearingPriceRate = llmBatch . matchedOrdersList [ 0 ] . matchingRate ;
162+ }
157163 this . matchedOrders = llmBatch . matchedOrdersList
158164 // there should never be a match that does not have both a bid and an ask, but
159165 // the proto -> TS compiler makes these objects optional. This filter is just
You can’t perform that action at this time.
0 commit comments