Skip to content
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

pretty print offer-data #422

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

0xEgao
Copy link

@0xEgao 0xEgao commented Feb 20, 2025

This pr tries to solve issue #413 ,Please have a look on it, I have implemented display trait, should I go with Serde? Suggest the changes I will work upon them

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

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

Project coverage is 70.40%. Comparing base (4f3cae3) to head (6e9e78b).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
src/protocol/messages.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #422      +/-   ##
==========================================
- Coverage   70.43%   70.40%   -0.04%     
==========================================
  Files          34       34              
  Lines        4245     4247       +2     
==========================================
  Hits         2990     2990              
- Misses       1255     1257       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

self.minimum_locktime,
self.max_size,
self.min_size,
self.tweakable_point,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need the tweakable point.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add the tor address instead.

self.max_size,
self.min_size,
self.tweakable_point,
self.fidelity
Copy link

@mojoX911 mojoX911 Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fidelity itself is a pretty big structure, we cannot directly print it. We just need the fidelity_bond value. And to calculate that we need access to the bitcoin RPC.

So this cannot be implemented directly with Display trait. Instead make a dedicated function at taker::api.rs, named display_fidelity, and use the taker::wallet::rpc to calculate the bond value. There is a caluclate_bond_value API on FidelityBond that you can directly use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants