Skip to content

Commit

Permalink
ensure timestamp parsing does not fail
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Sep 7, 2023
1 parent d60e5d2 commit 5d19795
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/arkchain-indexer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ fn get_order_listing_data(

Some(TokenEvent {
address: felt_to_hex_str(&collection),
timestamp: timestamp.try_into().unwrap(),
timestamp: timestamp.try_into().unwrap_or(0),
block_number,
event_type: String::from("listing"),
from_address: felt_to_hex_str(&seller),
Expand Down Expand Up @@ -284,7 +284,7 @@ fn get_order_finalized_data(

Some(TokenEvent {
address: felt_to_hex_str(&collection),
timestamp: timestamp.try_into().unwrap(),
timestamp: timestamp.try_into().unwrap_or(0),
block_number,
event_type: String::from("sale"),
from_address: felt_to_hex_str(&seller),
Expand Down

0 comments on commit 5d19795

Please sign in to comment.