Skip to content

Commit ca1a33e

Browse files
committed
prevent specifying both price feed ids and symbols
1 parent 9068d78 commit ca1a33e

File tree

1 file changed

+3
-0
lines changed
  • lazer/sdk/rust/protocol/src

1 file changed

+3
-0
lines changed

lazer/sdk/rust/protocol/src/api.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ impl SubscriptionParams {
224224
if value.price_feed_ids.is_none() && value.symbols.is_none() {
225225
return Err("either price feed ids or symbols must be specified");
226226
}
227+
if value.price_feed_ids.is_some() && value.symbols.is_some() {
228+
return Err("either price feed ids or symbols must be specified, not both");
229+
}
227230

228231
if let Some(ref ids) = value.price_feed_ids {
229232
if ids.is_empty() {

0 commit comments

Comments
 (0)