mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 12:26:45 +00:00
replace message after comparison check with that provided in signed file
This commit is contained in:
parent
0646c8aa28
commit
faa81f2273
1 changed files with 2 additions and 1 deletions
|
@ -553,7 +553,7 @@ public class MessageSignDialog extends Dialog<ButtonBar.ButtonData> {
|
||||||
String signedAddress = matcher.group(2);
|
String signedAddress = matcher.group(2);
|
||||||
String signedSignature = matcher.group(3);
|
String signedSignature = matcher.group(3);
|
||||||
|
|
||||||
if(!signedMessage.trim().equals(message.getText().trim().replaceAll("\r*\n*", ""))) {
|
if(!message.getText().isEmpty() && !signedMessage.trim().equals(message.getText().trim().replaceAll("\r*\n*", ""))) {
|
||||||
AppServices.showErrorDialog("Incorrect Message", "The file contained a different message of:\n\n" + signedMessage);
|
AppServices.showErrorDialog("Incorrect Message", "The file contained a different message of:\n\n" + signedMessage);
|
||||||
return;
|
return;
|
||||||
} else if(!signedAddress.trim().equals(address.getText().trim())) {
|
} else if(!signedAddress.trim().equals(address.getText().trim())) {
|
||||||
|
@ -561,6 +561,7 @@ public class MessageSignDialog extends Dialog<ButtonBar.ButtonData> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message.setText(signedMessage);
|
||||||
signature.setText(signedSignature);
|
signature.setText(signedSignature);
|
||||||
} else {
|
} else {
|
||||||
signature.setText(content);
|
signature.setText(content);
|
||||||
|
|
Loading…
Reference in a new issue