Skip to content

Commit bfd1477

Browse files
committed
pool+batches: fix batches not displaying in chart & list
1 parent 0ee7a4a commit bfd1477

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/store/models/batch.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)