Skip to content

payjoin-cli FeeRate arguments have differing types #452

Closed

Description

@DanGould

max_fee_rate takes a u64 while --fee-rate takes an f32

I do think an f32 is natural for this type for granular.

FeeRate arguments need attention in general in this crate. Some arguments are named sat_per_vb when they take a FeeRate type and don't need to specify that, for example.

And in payjoin-cli the feerate type should really be parsed from the argument directly rather than having business logic do it inside send/receive functionality.

Activity

  1. nothingmuch commented on Jan 2, 2025

    @nothingmuch
    Contributor

    Not sure if this is what you meant in the last paragraph, but IMO only main.rs should deal with anything that isn't FeeRate, be it float or int, sat/vb or sat/kwu, whatever...

  2. DanGould commented on Jan 2, 2025

    @DanGould
    MemberAuthor

    Yeah that's the vibe of what I was saying. We should use clap's Arg::value_parser to convert the string argument directly into the strongest appropriate type before passing to App functions.

  3. self-assigned this
    on Jan 14, 2025
  4. added a commit that references this issue on Jan 24, 2025
    877333a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions