Skip to content

Commit

Permalink
fix: nil paging info
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Dec 20, 2022
1 parent 2c6d5cd commit 77ace0d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions waku/v2/protocol/store/waku_store_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,16 @@ func (store *WakuStore) Next(ctx context.Context, r *Result) (*Result, error) {
return nil, errors.New("invalid cursor")
}

return &Result{
result := &Result{
Messages: response.Messages,
cursor: response.PagingInfo.Cursor,
query: q,
peerId: r.PeerID(),
}, nil
}

if response.PagingInfo != nil {
result.cursor = response.PagingInfo.Cursor
}

return result, nil

}

0 comments on commit 77ace0d

Please sign in to comment.