Skip to content

refactor: move to_rao/from_rao out of CLI helpers (#171)#331

Open
Rene0422 wants to merge 1 commit into
entrius:testfrom
Rene0422:refactor/move-rao-conversion-utils
Open

refactor: move to_rao/from_rao out of CLI helpers (#171)#331
Rene0422 wants to merge 1 commit into
entrius:testfrom
Rene0422:refactor/move-rao-conversion-utils

Conversation

@Rene0422
Copy link
Copy Markdown

Summary

  • Move to_rao / from_rao from allways/cli/swap_commands/helpers.py to allways/utils/misc.py — these are unit conversions, not CLI concerns.
  • Drop the now-unused TAO_TO_RAO import from helpers.py.
  • Update imports in all 8 CLI modules that used these helpers: status.py, collateral.py, view.py, miner_commands.py, swap.py, quote.py, admin.py, claim.py.
  • No backwards-compat re-export — direct move, callers updated in the same change.

Closes #171.

Test plan

  • ruff check clean on changed files
  • Full test suite: 470 passed
  • Smoke import of every touched CLI module + to_rao(1.5) == 1_500_000_000 / from_rao(1_500_000_000) == 1.5
  • Verified helpers module no longer exports to_rao / from_rao

@xiao-xiao-mao xiao-xiao-mao Bot added the refactor Restructures code without changing behavior label May 15, 2026
@Rene0422
Copy link
Copy Markdown
Author

@LandynDev , please review this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructures code without changing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

to_rao / from_rao live in cli/swap_commands/helpers.py but are used outside the CLI

1 participant