Skip to content

Commit

Permalink
Fix: Orderbook ProcessPool panic (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
deividaspetraitis authored Sep 3, 2024
1 parent f1efd83 commit 142faa7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions orderbook/usecase/orderbook_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ func (o *orderbookUseCaseImpl) ProcessPool(ctx context.Context, pool sqsdomain.P
return fmt.Errorf("pool is not an orderbook pool %d", poolID)
}

if cosmWasmPoolModel.Data.Orderbook == nil {
return fmt.Errorf("pool has no orderbook data %d", poolID)
}

// Update the orderbook client with the orderbook pool ID.
ticks := cosmWasmPoolModel.Data.Orderbook.Ticks
if len(ticks) == 0 {
Expand Down

0 comments on commit 142faa7

Please sign in to comment.