Skip to content

Commit

Permalink
avoid negative price
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Aug 30, 2022
1 parent e599d87 commit 7dbbd0d
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -84,6 +84,7 @@ ColumnLayout
left_btn.onClicked:
{
let price = General.formatDouble(parseFloat(input_price.text) - (General.formatDouble(API.app.trading_pg.cex_price)*0.01))
if (price < 0) price = 0
setPrice(String(price))
}
right_btn.onClicked:
Expand Down

0 comments on commit 7dbbd0d

Please sign in to comment.