Skip to content

Commit

Permalink
Add error to time conversion failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
vasyafromrussia committed Nov 17, 2023
1 parent 8656591 commit d908782
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contract/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ mod asserts;
pub(crate) mod tests;

pub(crate) fn unix_timestamp(ms: u64) -> UnixTimestamp {
u32::try_from(ms / 1000).unwrap_or_else(|_| panic_str("Failed to get convert milliseconds to Unix timestamp"))
u32::try_from(ms / 1000)
.unwrap_or_else(|err| panic_str(&format!("Failed to get convert milliseconds to Unix timestamp: {err}")))
}
Binary file modified res/sweat_claim.wasm
Binary file not shown.

0 comments on commit d908782

Please sign in to comment.