diff --git a/src/main/java/com/sparrowwallet/sparrow/control/MessageSignDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/MessageSignDialog.java index 62ffa966..b1ac0833 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/MessageSignDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/MessageSignDialog.java @@ -128,6 +128,7 @@ public class MessageSignDialog extends Dialog { address = new TextField(); address.getStyleClass().add("id"); address.setEditable(walletNode == null); + address.setTooltip(new Tooltip("Only Legacy (P2PKH), Nested Segwit (P2SH-P2WPKH) and Native Segwit (P2WPKH) singlesig addresses can sign")); addressField.getInputs().add(address); if(walletNode != null) { @@ -294,7 +295,7 @@ public class MessageSignDialog extends Dialog { private boolean isValidAddress() { try { Address address = getAddress(); - return address.getScriptType() != ScriptType.P2TR; + return address.getScriptType() != ScriptType.P2TR && address.getScriptType().isAllowed(PolicyType.SINGLE); } catch (InvalidAddressException e) { return false; } @@ -371,15 +372,9 @@ public class MessageSignDialog extends Dialog { } if(verified) { - Alert alert = new Alert(Alert.AlertType.INFORMATION); - AppServices.setStageIcon(alert.getDialogPane().getScene().getWindow()); - alert.setTitle("Verification Succeeded"); - alert.setHeaderText("Verification Succeeded"); - alert.setContentText("The signature verified against the message."); - AppServices.moveToActiveWindowScreen(alert); - alert.showAndWait(); + AppServices.showSuccessDialog("Verification Succeeded", "The signature verified against the message."); } else { - AppServices.showErrorDialog("Verification failed", "The provided signature did not match the message for this address."); + AppServices.showErrorDialog("Verification Failed", "The provided signature did not match the message for this address."); } } catch(IllegalArgumentException e) { AppServices.showErrorDialog("Could not verify message", e.getMessage());