I am using bitshares2-ui library to create my app. I have created limit_order_create operation to trade currency from my app. But limit_order_create operations behaves very weird.
For example if I want 0.1 EUR for 19.98414 BTS, it shows Sell 19.98414 BTS. Then if I want 0.1 EUR for 19.99 BTS it shows Sell 199841417742.87936 BTS. Please guide me to resolve this issue. Following is the limit_order_create operation definition which takes asset type in amount_to_sell.
limit_order_create = new Serializer(
"limit_order_create"
fee: asset
seller: protocol_id_type "account"
amount_to_sell: asset
min_to_receive: asset
expiration: time_point_sec
fill_or_kill: bool
extensions: set future_extensions
)
Following is asset type definition
asset = new Serializer(
"asset"
amount: int64
asset_id: protocol_id_type "asset"
)