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
That limit_amount.value value is the documented maximum Trustline limit amount (9999999999999999e80) so should be serializable and signable. I'm able to serialize, sign and successfully submit similar TrustSet transactions in xrpl4j, so I'm sure the value is valid. However, when I call safe_sign_transaction, I get the following error:
raise XRPLBinaryCodecException(
xrpl.core.binarycodec.exceptions.XRPLBinaryCodecException: Error processing LimitAmount: Decimal precision out of range for issued currency value.
My guess is that Decimal isn't a large enough data type to hold that value, but I'm not familiar enough with python to know what the correct data type is. See this method in amount.py:
defverify_iou_value(issued_currency_value: str) ->None:
""" Validates the format of an issued currency amount value. Raises if value is invalid. Args: issued_currency_value: A string representing the "value" field of an issued currency amount. Returns: None, but raises if issued_currency_value is not valid. Raises: XRPLBinaryCodecException: If issued_currency_value is invalid. """decimal_value=Decimal(issued_currency_value)
ifdecimal_value.is_zero():
returnexponent=decimal_value.as_tuple().exponentif (
(_calculate_precision(issued_currency_value) >MAX_IOU_PRECISION)
or (exponent>MAX_IOU_EXPONENT)
or (exponent<MIN_IOU_EXPONENT)
):
raiseXRPLBinaryCodecException(
"Decimal precision out of range for issued currency value."
)
_verify_no_decimal(decimal_value)
Thank you!
The text was updated successfully, but these errors were encountered:
@intelliot@JST5000 Sorry I never followed up on this. I believe this is still an issue. Even if you pass in an IssuedCurrencyAmount with a value in scientific notation (ie 9999999999999999e80), the above error is thrown. I haven't debugged this myself, but my guess is _calculate_precision is returning an incorrect value, or the Decimal class isn't parsing the value correctly/is normalizing it somehow.
I'm trying to sign the following transaction using the
xrpl.transaction.safe_sign_transaction
method:That
limit_amount.value
value is the documented maximum Trustline limit amount (9999999999999999e80
) so should be serializable and signable. I'm able to serialize, sign and successfully submit similarTrustSet
transactions in xrpl4j, so I'm sure the value is valid. However, when I callsafe_sign_transaction
, I get the following error:My guess is that
Decimal
isn't a large enough data type to hold that value, but I'm not familiar enough with python to know what the correct data type is. See this method inamount.py
:Thank you!
The text was updated successfully, but these errors were encountered: