mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Start edit only when intialized with data
This commit is contained in:
parent
5276671f1e
commit
a8baead3f9
1 changed files with 11 additions and 10 deletions
|
@ -95,15 +95,6 @@ public class EditOpenOfferView extends EditableOfferView<EditOpenOfferViewModel>
|
|||
updateMarketPriceAvailable();
|
||||
updateElementsWithDirection();
|
||||
|
||||
model.onStartEditOffer(errorMessage -> {
|
||||
log.error(errorMessage);
|
||||
new Popup<>().warning(Res.get("editOffer.failed", errorMessage))
|
||||
.onClose(() -> {
|
||||
close();
|
||||
})
|
||||
.show();
|
||||
});
|
||||
|
||||
model.isNextButtonDisabled.setValue(false);
|
||||
cancelButton.setDisable(false);
|
||||
|
||||
|
@ -131,8 +122,18 @@ public class EditOpenOfferView extends EditableOfferView<EditOpenOfferViewModel>
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public void initWithData(OpenOffer openOffer) {
|
||||
super.initWithData(openOffer.getOffer().getDirection(), CurrencyUtil.getTradeCurrency(openOffer.getOffer().getCurrencyCode()).get());
|
||||
super.initWithData(openOffer.getOffer().getDirection(),
|
||||
CurrencyUtil.getTradeCurrency(openOffer.getOffer().getCurrencyCode()).get());
|
||||
model.initWithData(openOffer);
|
||||
|
||||
model.onStartEditOffer(errorMessage -> {
|
||||
log.error(errorMessage);
|
||||
new Popup<>().warning(Res.get("editOffer.failed", errorMessage))
|
||||
.onClose(() -> {
|
||||
close();
|
||||
})
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Reference in a new issue