This repository was archived by the owner on Jan 27, 2026. It is now read-only.
fix(worker): cleanup eth formatting#503
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR standardizes Ether amount formatting by replacing manual wei-to-ether conversions with the format_ether utility across provider operations, CLI commands, and an example.
- Imported and used
format_etherin place of manual division by 10^18. - Cleaned up various
Console::infoandprintln!calls for consistency.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| crates/worker/src/operations/provider.rs | Replaced manual wei division with format_ether in log messages. |
| crates/worker/src/cli/command.rs | Switched CLI output to use format_ether, added import and calls. |
| crates/dev-utils/examples/transfer_eth.rs | Updated example to format balances via format_ether. |
Comments suppressed due to low confidence (2)
crates/worker/src/operations/provider.rs:226
- [nitpick] The label "Balance" is ambiguous in the context of both token and ETH balances; consider making it more specific (e.g., "Token balance").
Console::info("Balance", &format_ether(balance));
crates/worker/src/operations/provider.rs:274
- [nitpick] This duplicate log also uses the generic label "Balance"; renaming it to distinguish token balance from ETH balance would improve clarity.
Console::info("Balance", &format_ether(balance));
b8afd5f to
9c5133d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.