Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeantonio21 committed May 8, 2024
1 parent 0afc273 commit dc1c865
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion atoma-event-subscribe/sui/src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ impl SuiSubscriber {

pub async fn subscribe(self) -> Result<(), SuiSubscriberError> {
let event_api = self.sui_client.event_api();
let mut subscribe_event = event_api.subscribe_event(self.filter.clone()).await?;
let mut subscribe_event = match event_api.subscribe_event(self.filter.clone()).await {
Ok(subscriber) => subscriber,
Err(e) => { error!("Failed to start subscribe event, with error: {e}"); return Err(SuiSubscriberError::SuiBuilderError(e))}
};
info!("Starting event while loop");
while let Some(event) = subscribe_event.next().await {
match event {
Expand Down

0 comments on commit dc1c865

Please sign in to comment.