rust-payjoin icon indicating copy to clipboard operation
rust-payjoin copied to clipboard

Use web_time::SystemTime

Open riverKanies opened this issue 9 months ago • 4 comments

instead of std::time::SystemTime To support time in browsers/wasm

re: #594

riverKanies avatar Mar 20 '25 18:03 riverKanies

It would be better take this dependency as a feature option, even though it only gets used for wasm32-unknown-unknown, in order to minimize our dependency tree for most feature sets.

You can see how this was done in rustls-pki-types here for example

DanGould avatar Mar 21 '25 22:03 DanGould

@DanGould should I do the target_family = "wasm", target_os = "unknown" stuff or is just a web feature enough for now? I was thinking just make a web feature and include it on the payjoin-ffi wasm feature

riverKanies avatar Mar 24 '25 17:03 riverKanies

Pull Request Test Coverage Report for Build 13977217809

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 7 of 8 (87.5%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 80.411%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin/src/receive/v2/error.rs 0 1 0.0%
<!-- Total: 7 8
Totals Coverage Status
Change from base Build 13955812638: 0.03%
Covered Lines: 4848
Relevant Lines: 6029

💛 - Coveralls

coveralls avatar Mar 24 '25 20:03 coveralls

Yes we do want the target as well because otherwise this could compile for targets where the proposed solution would not work

DanGould avatar Mar 24 '25 20:03 DanGould

Closing this and #594 as no clear direction was decided on.

spacebear21 avatar Jun 09 '25 19:06 spacebear21