mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 10:22:18 +01:00
Fix nullpointer
Log used message (not set string here) instead of PrivateNotificationPayload message.
This commit is contained in:
parent
aecbb71620
commit
2d5688a9a3
@ -131,32 +131,31 @@ public class SendPrivateNotificationWindow extends Overlay<SendPrivateNotificati
|
||||
Button sendButton = new AutoTooltipButton(Res.get("sendPrivateNotificationWindow.send"));
|
||||
sendButton.setOnAction(e -> {
|
||||
if (alertMessageTextArea.getText().length() > 0 && keyInputTextField.getText().length() > 0) {
|
||||
PrivateNotificationPayload privateNotification = new PrivateNotificationPayload(alertMessageTextArea.getText());
|
||||
if (!sendPrivateNotificationHandler.handle(
|
||||
new PrivateNotificationPayload(alertMessageTextArea.getText()),
|
||||
privateNotification,
|
||||
pubKeyRing,
|
||||
nodeAddress,
|
||||
keyInputTextField.getText(),
|
||||
new SendMailboxMessageListener() {
|
||||
@Override
|
||||
public void onArrived() {
|
||||
log.info("{} arrived at peer {}.",
|
||||
message.getClass().getSimpleName(), nodeAddress);
|
||||
log.info("PrivateNotificationPayload arrived at peer {}.", nodeAddress);
|
||||
new Popup<>().feedback(Res.get("shared.messageArrived"))
|
||||
.onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStoredInMailbox() {
|
||||
log.info("{} stored in mailbox for peer {}.",
|
||||
message.getClass().getSimpleName(), nodeAddress);
|
||||
log.info("PrivateNotificationPayload stored in mailbox for peer {}.", nodeAddress);
|
||||
new Popup<>().feedback(Res.get("shared.messageStoredInMailbox"))
|
||||
.onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFault(String errorMessage) {
|
||||
log.error("{} failed: Peer {}, errorMessage={}",
|
||||
message.getClass().getSimpleName(), nodeAddress, errorMessage);
|
||||
log.error("PrivateNotificationPayload failed: Peer {}, errorMessage={}", nodeAddress,
|
||||
errorMessage);
|
||||
new Popup<>().feedback(Res.get("shared.messageSendingFailed", errorMessage))
|
||||
.onClose(SendPrivateNotificationWindow.this::hide).show();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user