Skip to content

fix: added check for positive amount #3588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mdqst
Copy link

@mdqst mdqst commented Mar 25, 2025

Description:

Added a check to ensure amount is greater than zero, preventing transfers with invalid or zero amounts.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@mdqst mdqst requested review from a team as code owners March 25, 2025 10:03
@mdqst mdqst requested a review from quiet-node March 25, 2025 10:03
@quiet-node
Copy link
Contributor

Hey @mdqst thanks for opening the PR! The team will get to review this PR soon. In the meantime, could you please create a GitHub issue detailing the project’s problem and kindly link it to this PR? We enforce this pattern to ensure every PR is associated with an issue, providing clear context for future reference if revisiting the changes is needed.

@quiet-node quiet-node added the internal For changes that affect the project's internal workings but not its outward-facing functionality. label Mar 25, 2025
@quiet-node quiet-node added this to the 0.68.0 milestone Mar 25, 2025
@quiet-node
Copy link
Contributor

quiet-node commented Apr 8, 2025

Hey @mdqst hope things are going fine for you. Just wanted to make sure you got this message #3588 (comment) above

@mdqst
Copy link
Author

mdqst commented Apr 8, 2025

The team will get to review this PR soon. In the meantime, could you please create a GitHub issue detailing the project’s problem and kindly link it to this PR? We enforce this pattern to ensure every PR is associated with an issue, providing clear context for future reference if revisiting the changes is needed.

I want to emphasize that adding the check for a positive amount is critical to prevent errors when attempting to perform a transaction with a zero or negative amount. Without this check, the system might process invalid transactions, leading to unwanted consequences. This PR addresses that issue and improves system stability.

I believe this change should be merged as soon as possible to prevent potential issues in the future.

Copy link
Contributor

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@           Coverage Diff           @@
##             main    #3588   +/-   ##
=======================================
  Coverage        ?   35.02%           
=======================================
  Files           ?       71           
  Lines           ?     4637           
  Branches        ?      979           
=======================================
  Hits            ?     1624           
  Misses          ?     2786           
  Partials        ?      227           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@quiet-node
Copy link
Contributor

The team will get to review this PR soon. In the meantime, could you please create a GitHub issue detailing the project’s problem and kindly link it to this PR? We enforce this pattern to ensure every PR is associated with an issue, providing clear context for future reference if revisiting the changes is needed.

I want to emphasize that adding the check for a positive amount is critical to prevent errors when attempting to perform a transaction with a zero or negative amount. Without this check, the system might process invalid transactions, leading to unwanted consequences. This PR addresses that issue and improves system stability.

I believe this change should be merged as soon as possible to prevent potential issues in the future.

@mdqst I understand the critical impact, but please create a new issue describing the problem and link it to the PR. Otherwise, the PR label and milestone checks will fail: https://github.com/hiero-ledger/hiero-json-rpc-relay/actions/runs/14062654716/job/40201063266?pr=3588

@quiet-node
Copy link
Contributor

@mdqst any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal For changes that affect the project's internal workings but not its outward-facing functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants