Skip to content

Commit 6cadb19

Browse files
authored
fix: skip serialization of continuation token if None (#530)
1 parent 082f556 commit 6cadb19

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

starknet-core/src/types/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ pub struct EventsPage {
106106
/// Matching events
107107
pub events: Vec<EmittedEvent>,
108108
/// A pointer to the last element of the delivered page, use this token in a subsequent query to
109-
/// obtain the next page
109+
/// obtain the next page. If the value is `None`, don't add it to the response as clients might
110+
/// use `contains_key` as a check for the last page.
111+
#[serde(skip_serializing_if = "Option::is_none")]
110112
pub continuation_token: Option<String>,
111113
}
112114

0 commit comments

Comments
 (0)