pikers / piker

(e2e) foss trading for non-tinas
GNU Affero General Public License v3.0
103 stars 17 forks source link

Order mode allocator limit field should not allow value smaller then current pp #267

Open goodboy opened 2 years ago

goodboy commented 2 years ago

@iamzoltan found this and results in a -ve buy size 😂 (which makes sense under allocator limit algebra btw).

We need to add logic to the limit write block in the setings handler to prevent it from being set greater then the piker.ui._position.PositionTracker.live_pp value.

Likely the best UX approach would be to ignore the input if less then .live_pp, set back the current pp value, and then set an error status using the god widget to indicate to the user that the input was invalid.