Skip to content
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

Error: MPTAmount value field rejects valid float values (e.g., 10.01) #796

Open
ObiajuluM opened this issue Jan 5, 2025 · 2 comments
Open

Comments

@ObiajuluM
Copy link

When I attempt to send an MPT payment transaction with an MPTAmount value of 10.01 (a float), the SDK throws the following error:

xrpl.core.binarycodec.exceptions.XRPLBinaryCodecException: Error processing Amount: 10.01 is an invalid MPT amount.

This behavior is unexpected as the SDK type hints suggest that float values should be acceptable for the MPTAmount.value field.

Expected Behavior:

The SDK should successfully process float values for the MPTAmount value field in MPT payment transactions.

Steps to Reproduce:

  • Create an MPT payment transaction with an MPTAmount value of 10.01 (or any other float value with decimal places).
  • Attempt to send the transaction using the SDK.
@mvadari
Copy link
Collaborator

mvadari commented Jan 6, 2025

Amounts should be specified as strings - e.g. "10.01".

@ObiajuluM
Copy link
Author

I found out, I just came here to report about the error in the sdk
{E1AB4DB1-042C-4B43-B602-9C81310FEBC2}

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

No branches or pull requests

2 participants