Skip to content

Commit

Permalink
Fix TradeWizardPriceController throwing exception
Browse files Browse the repository at this point in the history
Price controller was throwing an exception upon percentage validation.
It worked well while creating offers in one market, but when switching
markets and creating a new offer it failed since it was using the
previous quote price. Thus, this resets the missing fields every time
we use the TradeWizzard.
  • Loading branch information
axpoems committed Mar 9, 2024
1 parent 51b678f commit e465192
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ private Model() {

public void reset() {
priceQuote.set(null);
priceString.set(null);
market = null;
isFocused = false;
description.set(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public ReadOnlyObjectProperty<PriceSpec> getPriceSpec() {
}

public void reset() {
priceInput.reset();
model.reset();
}

Expand Down

0 comments on commit e465192

Please sign in to comment.