Skip to content

Conversation

@sundayonah
Copy link
Collaborator

@sundayonah sundayonah commented Dec 20, 2025

Description

Describe the purpose of this PR along with any background information and the impacts of the proposed change. For the benefit of the community, please do not assume prior context.

Provide details that support your chosen implementation, including: breaking changes, alternatives considered, changes to the API, contracts etc.

References

Include any links supporting this change such as a:

If there are no references, simply delete this section.

Testing

Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this project has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Also include details of the environment this PR was developed in (language/platform/browser version).

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation and tests for new/changed functionality in this PR
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

By submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.

Summary by CodeRabbit

  • Bug Fixes
    • Improved precision handling for token decimal calculations in transfer operations to ensure accurate value conversions and validation.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The TransformVoyagerTransferToRPCFormat function's tokenDecimals variable type is changed from int to float64. This modifies how the extracted decimals value is handled in subsequent validation and decimal conversion operations, while the overall function logic remains unchanged.

Changes

Cohort / File(s) Change Summary
Decimal Type Update
services/voyager.go
Changed tokenDecimals extraction from int to float64 in TransformVoyagerTransferToRPCFormat, affecting type handling in validation and decimal conversion operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the type change from int to float64 is intentional and aligns with downstream calculations
  • Confirm no precision or rounding issues arise from the type conversion
  • Check that validation logic and ToSubunit calculation handle float64 correctly

Possibly related PRs

Suggested reviewers

  • chibie
  • 5ran6
  • onahprosper

Poem

🐰 A decimal dance, from whole to part,
Where integers once played their part!
Now floats take flight with graceful care,
More precise calculations fill the air! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/decimals-float64

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1aedd23 and 07f67cd.

📒 Files selected for processing (1)
  • services/voyager.go (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@onahprosper onahprosper merged commit f718dcf into main Dec 20, 2025
0 of 2 checks passed
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.

Save previous provider rates in priority queue to reduce order failures

3 participants