Skip to content

Validate order amount against the node's min/max sats limits before submitting #282

Description

@Catrya

The create-order form only checks that amounts are positive and min < max
(_checkValid in lib/features/order/screens/add_order_screen.dart). It never
compares the amount against the Mostro node's min_order_amount /
max_order_amount, even though the app already parses both from the node info
event (they are shown in the About screen). An out-of-range order is only
rejected by the daemon after submission.

Expected behavior (v1 parity)

The mobile app validates before submitting (_validateSatsRange in
add_order_screen.dart): it converts the fexchange
rate, compares against the node limits, andalized
message like:

The amount is too low. This Mostro node anSats - maxSats sats).

with a sats-only fallback when the fiat ranth
bounds of a range order validated.

Notes

  • For fixed-sats orders the check is direct
  • For market-price orders appv2 currently h*
    (see comment in add_order_screen.dart a this
    needs porting an exchange-rate provider (s issue
    to fixed-sats first.
  • Strings must be localized in the 5 .arb

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions