improve error handling

show error popup on error initializing trade
instruct to close monero-wallet-rpc on error opening wallets
throw error if trade missing wallet on init or failure to sign payout tx
This commit is contained in:
woodser 2023-04-26 08:56:52 -04:00
parent 4cf6992113
commit 6d2819bde7
4 changed files with 31 additions and 23 deletions

View file

@ -220,6 +220,15 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
tradeManager.applyTradePeriodState();
tradeManager.getObservableList().forEach(trade -> {
// check initialization error
if (trade.getInitError() != null) {
new Popup().warning("Error initializing trade" + " " + trade.getShortId() + "\n\n" +
trade.getInitError().getMessage())
.show();
}
// check trade period
Date maxTradePeriodDate = trade.getMaxTradePeriodDate();
String key;
switch (trade.getPeriodState()) {