librustzcash icon indicating copy to clipboard operation
librustzcash copied to clipboard

zcash_client_backend: Add a Tor client that can fetch USD/ZEC exchange rates

Open str4d opened this issue 1 year ago • 3 comments

Closes #1416.

str4d avatar Jun 14 '24 23:06 str4d

Codecov Report

Attention: Patch coverage is 0% with 71 lines in your changes missing coverage. Please review.

Project coverage is 63.90%. Comparing base (eaa43b4) to head (ac5bac9).

Files Patch % Lines
zcash_client_backend/src/tor/http.rs 0.00% 62 Missing :warning:
zcash_client_backend/src/tor/http/cryptex.rs 0.00% 9 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1422      +/-   ##
==========================================
- Coverage   64.19%   63.90%   -0.30%     
==========================================
  Files         130      132       +2     
  Lines       15423    15494      +71     
==========================================
  Hits         9901     9901              
- Misses       5522     5593      +71     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 15 '24 00:06 codecov[bot]

Rebased on main to fix merge conflict in changelog.

str4d avatar Jul 02 '24 14:07 str4d

Force-pushed to remove unnecessary tor_dir permissions changes, and address CI lints.

str4d avatar Jul 02 '24 16:07 str4d

Force-pushed to not pass ExchangePair through to the individual queriers. Only two exchanges offer actual USD/ZEC pairs (the rest are USDT/ZEC), and even if we could get data for e.g. GBP/ZEC that wouldn't help with arbitrary fiat currencies.

Instead, we will always query for USD(T)/ZEC, and then use a forex rate for TARGET/USD to adjust, once I can find a suitable free source of forex data.

str4d avatar Jul 15 '24 02:07 str4d

Rebased on main after TEX address support landed.

str4d avatar Jul 17 '24 19:07 str4d

Force-pushed to rework the exchange rate API to allow callers to customise the exchanges (or define their own data sources).

str4d avatar Jul 18 '24 01:07 str4d

Force-pushed to address review comments.

str4d avatar Jul 18 '24 17:07 str4d