do not cancel take offer screen on maker disconnect if initializing

This commit is contained in:
woodser 2024-05-12 10:02:40 -04:00
parent 091ffd98eb
commit 6dedce1d27

View File

@ -493,6 +493,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
connectionListener = new ConnectionListener() {
@Override
public void onDisconnect(CloseConnectionReason closeConnectionReason, Connection connection) {
if (trade == null) return; // ignore if trade initializing
if (connection.getPeersNodeAddressOptional().isPresent() &&
connection.getPeersNodeAddressOptional().get().equals(offer.getMakerNodeAddress())) {
offerWarning.set(Res.get("takeOffer.warning.connectionToPeerLost"));