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
As noticed by @nikhilsaraf in stellar-deprecated/kelp#405 (comment) it's not possible to set a price on operations with price field in n/d form. This makes it impossible to represent prices without finite decimal expansion with a reasonable number of decimal places.
To solve this we should update operations with Price fields (like ManageBuyOffer) with a new struct type that consists of two int32 values: n and d. Users willing to use string representation of the price could still use price.Parse function (note that it returns xdr.Price so we'd need to create an intermediary type).
Alternatively, we can add an extra field as above, but leave the old Price field and allow only one of them to be set.
The text was updated successfully, but these errors were encountered:
What version are you using?
master
What did you do?
As noticed by @nikhilsaraf in stellar-deprecated/kelp#405 (comment) it's not possible to set a price on operations with price field in n/d form. This makes it impossible to represent prices without finite decimal expansion with a reasonable number of decimal places.
To solve this we should update operations with
Price
fields (likeManageBuyOffer
) with a new struct type that consists of twoint32
values: n and d. Users willing to use string representation of the price could still useprice.Parse
function (note that it returnsxdr.Price
so we'd need to create an intermediary type).Alternatively, we can add an extra field as above, but leave the old
Price
field and allow only one of them to be set.The text was updated successfully, but these errors were encountered: