mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Wait for initialized wallet before processing dispute msgs, fix #2914
This commit is contained in:
parent
d53c3b387c
commit
cf5c03f43d
1 changed files with 9 additions and 0 deletions
|
@ -120,6 +120,7 @@ public class DisputeManager implements PersistedDataHost {
|
|||
private final Map<String, Subscription> disputeIsClosedSubscriptionsMap = new HashMap<>();
|
||||
@Getter
|
||||
private final IntegerProperty numOpenDisputes = new SimpleIntegerProperty();
|
||||
private boolean servicesInitialized;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -177,6 +178,7 @@ public class DisputeManager implements PersistedDataHost {
|
|||
}
|
||||
|
||||
public void onAllServicesInitialized() {
|
||||
servicesInitialized = true;
|
||||
p2PService.addP2PServiceListener(new BootstrapListener() {
|
||||
@Override
|
||||
public void onUpdatedDataReceived() {
|
||||
|
@ -266,6 +268,13 @@ public class DisputeManager implements PersistedDataHost {
|
|||
}
|
||||
|
||||
private void applyMessages() {
|
||||
// Some messages can't be handled until all the services are properly initialized.
|
||||
// In particular it's not possible to complete the signing of a dispute payout
|
||||
// by an encrypted wallet until after it's been decrypted.
|
||||
if (!servicesInitialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
decryptedDirectMessageWithPubKeys.forEach(decryptedMessageWithPubKey -> {
|
||||
NetworkEnvelope networkEnvelope = decryptedMessageWithPubKey.getNetworkEnvelope();
|
||||
if (networkEnvelope instanceof DisputeMessage) {
|
||||
|
|
Loading…
Add table
Reference in a new issue