Skip to content

Commit

Permalink
jade: replace wasm-timer with web-time
Browse files Browse the repository at this point in the history
the former is unmaintained and throw an audit warning on a dep
  • Loading branch information
RCasatta committed Nov 11, 2024
1 parent 86caed5 commit 2ca3d3b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 67 deletions.
80 changes: 16 additions & 64 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lwk_jade/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ tokio = { version = "1.36.0", features = [
"io-util",
"sync",
], optional = true }
wasm-timer = "0.2.5"
web-time = "1.1.0"

[features]
default = ["sync", "test_emulator"]
Expand Down
4 changes: 2 additions & 2 deletions lwk_jade/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ pub struct AuthUserParams {

impl AuthUserParams {
pub fn new(network: crate::Network) -> Self {
let epoch = wasm_timer::SystemTime::now()
.duration_since(wasm_timer::SystemTime::UNIX_EPOCH)
let epoch = web_time::SystemTime::now()
.duration_since(web_time::SystemTime::UNIX_EPOCH)
.map(|e| e.as_secs())
.unwrap_or(0);
AuthUserParams { network, epoch }
Expand Down

0 comments on commit 2ca3d3b

Please sign in to comment.