Skip to content

Commit

Permalink
fix: skip serialization of continuation token if None (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvsadana authored Dec 21, 2023
1 parent 082f556 commit 6cadb19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion starknet-core/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ pub struct EventsPage {
/// Matching events
pub events: Vec<EmittedEvent>,
/// A pointer to the last element of the delivered page, use this token in a subsequent query to
/// obtain the next page
/// obtain the next page. If the value is `None`, don't add it to the response as clients might
/// use `contains_key` as a check for the last page.
#[serde(skip_serializing_if = "Option::is_none")]
pub continuation_token: Option<String>,
}

Expand Down

0 comments on commit 6cadb19

Please sign in to comment.