Skip to content

Commit

Permalink
Fix: Orderbook ProcessPool panic (#497) (#498)
Browse files Browse the repository at this point in the history
(cherry picked from commit 142faa7)

Co-authored-by: Deividas Petraitis <[email protected]>
  • Loading branch information
mergify[bot] and deividaspetraitis authored Sep 3, 2024
1 parent dc058a2 commit 2a65703
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 2a65703

Please sign in to comment.