mostro icon indicating copy to clipboard operation
mostro copied to clipboard

Rango de cantidades al ordenar.

Open villalobosij opened this issue 10 months ago • 7 comments

Buen día, ¿qué pueden decir de rango de cantidades al ordenar?, algo como en LNp2pBot separando los números por un guion (-).

villalobosij avatar Apr 28 '24 16:04 villalobosij

@bilthon @grunch

What do you think about this? I think it's a nice idea...do you think that we want to implement it? Considering that will impact a bit on all sides? Mostrod, CLI and web I suppose...

arkanoider avatar May 09 '24 09:05 arkanoider

@bilthon @grunch

What do you think about this? I think it's a nice idea...do you think that we want to implement it? Considering that will impact a bit on all sides? Mostrod, CLI and web I suppose...

yes this is a great idea, really useful on @lnp2pbot we definitely will have to do this one

grunch avatar May 09 '24 12:05 grunch

Hi @grunch @bilthon ,

was lookin to that and we could think about something like this:

  • In Mostrod splitting fiat amount in two: min_fiat_amout and max_fiat_amount (this will be a rust Option imo ) this means also adding a check when an order is taken that user stays in the range of seller/buyer,
  • In CLI/Web we need to have the option to permit the creation of the ranged value, in CLI could be simply something like checking if - is present in new order fiat amount and extract min and max to pass to mostrod. For web I accept any @bilthon suggestion! :) Maybe adding some interacting way to choose single amount or ranged amount.

Min amount should be always present and in that case also taking an order should have the same flow as now.

Putting my two cents...

arkanoider avatar May 10 '24 19:05 arkanoider

Hi @grunch @bilthon ,

was lookin to that and we could think about something like this:

* In `Mostrod` splitting fiat amount in two: `min_fiat_amout` and `max_fiat_amount` (this will be a rust Option imo ) this means also adding a check when an order is taken that user stays in the range of seller/buyer,

* In CLI/Web we need to have the option to permit the creation of the ranged value, in CLI could be simply something like checking if `-` is present in new order fiat amount and extract min and max to pass to mostrod. For web I accept any @bilthon suggestion! :) Maybe adding some interacting way to choose single amount or ranged amount.

Min amount should be always present and in that case also taking an order should have the same flow as now.

Putting my two cents...

Hey buddy, before start please give it a look on this issue and PR, we already did this.

https://github.com/lnp2pBot/bot/issues/151

Also we have those fields already on db, give it a look

https://github.com/MostroP2P/mostro/blob/main/migrations/20221222153301_orders.sql#L19-L20

grunch avatar May 10 '24 20:05 grunch

Yep! Thanks for reminding me and nice to read the idea on lnp2p bot! So if user get less then max amount we have to diminish automatically the order quantity, in case a buyer take all the max amount the orde disappear normally.

I am going for it if it's.ok!

arkanoider avatar May 11 '24 07:05 arkanoider

Yep! Thanks for reminding me and nice to read the idea on lnp2p bot! So if user get less then max amount we have to diminish automatically the order quantity, in case a buyer take all the max amount the orde disappear normally.

I am going for it if it's.ok!

yes and if the rest is less than the minimum the order is not published again.

go ahead buddy

grunch avatar May 11 '24 11:05 grunch

yes and if the rest is less than the minimum the order is not published again.

Clear!

Let's go...monday will work on this!

arkanoider avatar May 11 '24 11:05 arkanoider