mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Remove unneeded wrapping of tradeMessage into DecryptedMessageWithPubKey
This commit is contained in:
parent
3875bd85d1
commit
0f087946fc
1 changed files with 2 additions and 10 deletions
|
@ -40,8 +40,6 @@ import bisq.common.crypto.PubKeyRing;
|
||||||
import bisq.common.proto.network.NetworkEnvelope;
|
import bisq.common.proto.network.NetworkEnvelope;
|
||||||
import bisq.common.taskrunner.Task;
|
import bisq.common.taskrunner.Task;
|
||||||
|
|
||||||
import java.security.PublicKey;
|
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -168,14 +166,8 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeMailboxMessageAfterProcessing(TradeMessage tradeMessage) {
|
public void removeMailboxMessageAfterProcessing(TradeMessage tradeMessage) {
|
||||||
if (tradeMessage instanceof MailboxMessage &&
|
if (tradeMessage instanceof MailboxMessage) {
|
||||||
processModel.getTradingPeer() != null &&
|
processModel.getP2PService().getMailboxMessageService().removeMailboxMsg((MailboxMessage) tradeMessage);
|
||||||
processModel.getTradingPeer().getPubKeyRing() != null &&
|
|
||||||
processModel.getTradingPeer().getPubKeyRing().getSignaturePubKey() != null) {
|
|
||||||
PublicKey sigPubKey = processModel.getTradingPeer().getPubKeyRing().getSignaturePubKey();
|
|
||||||
// We reconstruct the DecryptedMessageWithPubKey from the message and the peers signature pubKey
|
|
||||||
DecryptedMessageWithPubKey decryptedMessageWithPubKey = new DecryptedMessageWithPubKey(tradeMessage, sigPubKey);
|
|
||||||
processModel.getP2PService().getMailboxMessageService().removeMailboxMsg(decryptedMessageWithPubKey);
|
|
||||||
log.info("Remove {} from the P2P network.", tradeMessage.getClass().getSimpleName());
|
log.info("Remove {} from the P2P network.", tradeMessage.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue