Skip to content

[devkit/utilities] Implement fee formatting functions #377

Description

@Tinna23

Format fee values for display in different contexts.

Functions:

pub fn format_stroops(n: u64) -> String  // "3,849 str"
pub fn format_xlm(n: u64) -> String      // "0.0003849 XLM"
pub fn format_fee_short(n: u64) -> String // auto: str below 1M, XLM above

Files to touch:

  • packages/devkit/src/utilities/formatters.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    devkitScoped to packages/devkitgood first issueGood for newcomersutilitiesShared helpers and converters

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions