-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
decode
panics on wasm32-unknown-unknown
when validate_exp
is true
#339
Comments
2 is not great because that means you now need to set the timestamp everytime you use the library while I'm expecting a lot of |
Yes. As mentioned in the PR, it's missing CI |
@Keats The structure of I made another PR that uses |
fn get_current_timestamp() -> u64
usesSystemTime::now()
to get the current unix timestamp. Unfortunately,SystemTime
functions panic onwasm32-unknown-unknown
.There are a couple of approaches to fix this:
chrono
for getting the timestampValidation
, allow the user to supply a timestampAs a long-term solution, I prefer option 2 as it adds no cost, doesn't inflate the dependency tree, and allows for better customization.
The text was updated successfully, but these errors were encountered: