You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docstring comment for the amount parameter states it's in "units of the coin" with example "1 USDC == 1000000", but this is actually describing decimals, not units. This could be confusing as it contradicts the PR description which correctly states the input is in decimals.
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.
PR Code Suggestions ✨
Explore these optional code suggestions:
Category
Suggestion
Impact
General
Fix misleading documentation
The docstring is incorrect about the units. It should clarify that the amount is in the smallest units (e.g., 1 USDC is represented as 1000000 units), not "in the units of the coin".
-amount (uint): The amount to be deposited in the units of the coin being deposited (for example, 1 USDC == 1000000)+amount (uint): The amount to be deposited in the smallest units of the coin (for example, 1 USDC == 1000000 units)
Apply this suggestion
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly identifies that the docstring wording is ambiguous. Changing "in the units of the coin" to "in the smallest units of the coin" provides clearer documentation about how amounts should be specified, which is important for correct API usage.
Medium
More
YameenMalik
changed the title
Decimal Updates
[BFP-1144 Deposit Call Decimal Updates
Mar 22, 2025
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
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.
User description
Added code comments to make it clear that the input amount to
deposit_to_asset_bankis in decimals of the coin being deposited.PR Type
Documentation, Tests
Description
Clarified the unit of
amountindeposit_to_asset_bankmethod.Updated test comments to specify decimal places for USDC.
Removed unnecessary debug print statement in
get_coin_having_balance.Changes walkthrough 📝
rpc.py
Clarified `amount` units in `deposit_to_asset_bank` docstringpython/sdk/src/crypto_helpers/rpc.py
deposit_to_asset_bankto specify that theamountis in the smallest units of the coin.utils.py
Removed debug print statement in utility functionpython/sdk/src/crypto_helpers/utils.py
get_coin_having_balance.test_rpc_calls.py
Updated test comments for USDC decimal placespython/sdk/tests/test_rpc_calls.py