Skip to content

Conversation

@viviveevee
Copy link
Contributor

@viviveevee viviveevee commented Jan 22, 2026

  • Get rid of any mentions of TCYCLES in favor of cycles
  • Cycles amounts now display with underscores
  • Pretend the cycles ledger has 0 decimals and the symbol cycles
  • Support new formats in token and cycle inputs:
    • _ is allowed and ignored: 1_000 parses to 1000
    • k, m, b, t suffixes (case insensitive) to avoid typing a bunch of zeroes
    • allow arbitrary combinations thereof: 1_234.56K parses to 1234560

@viviveevee viviveevee changed the title chore: remove TCYCLES from output chore: remove TCYCLES from output, input rework Jan 22, 2026
@viviveevee viviveevee marked this pull request as ready for review January 22, 2026 10:49
@viviveevee viviveevee requested a review from a team as a code owner January 22, 2026 10:49
@raymondk
Copy link
Contributor

raymondk commented Jan 22, 2026

Notes from standup:

  • We'll remove the special handling of 'cycles' in the icp token command.
  • We will add a icp cycles transfer command
  • icp token will be used to handle ICRC1 tokens without and special treatment (no mention of TCYCLES for now)
  • clarify the docs for icp token to say that the TOKEN arg is a name or an ICRC1 ledger id

// Display results
let _ = ctx.term.write_line(&format!(
"Minted {} TCYCLES to your account, new balance: {} TCYCLES.",
"Minted {} to your account, new balance: {}.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Minted {} to your account, new balance: {}.",
"Minted {} cycles to your account, new balance: {} cycles.",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The symbol is included in the struct that is displayed

transfer_info.receiver,
transfer_info.block_index
"Transferred {} to {} in block {}",
transfer_info.transferred, transfer_info.receiver, transfer_info.block_index
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not show the symbol here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here, it's in the displayed struct

@viviveevee viviveevee enabled auto-merge (squash) January 23, 2026 15:55
@viviveevee viviveevee merged commit 44137a8 into main Jan 23, 2026
74 checks passed
@viviveevee viviveevee deleted the vivee/amount-parsing-2 branch January 23, 2026 16:04
@viviveevee viviveevee changed the title chore: remove TCYCLES from output, input rework refactor!: Overhaul cycles handling - new amount formats, display changes, and cycles transfer command Jan 23, 2026
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.

4 participants