mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 13:26:44 +00:00
disable receive address field once used
This commit is contained in:
parent
e62b44bbbe
commit
164742387f
2 changed files with 3 additions and 1 deletions
|
@ -126,6 +126,7 @@ public class ReceiveController extends WalletFormController implements Initializ
|
|||
lastUsed.setText("Never");
|
||||
lastUsed.setGraphic(getUnusedGlyph());
|
||||
address.getStyleClass().remove("error");
|
||||
address.setDisable(false);
|
||||
} else if(!currentOutputs.isEmpty()) {
|
||||
long count = currentOutputs.size();
|
||||
BlockTransactionHashIndex lastUsedReference = currentOutputs.stream().skip(count - 1).findFirst().get();
|
||||
|
@ -133,11 +134,13 @@ public class ReceiveController extends WalletFormController implements Initializ
|
|||
lastUsed.setGraphic(getWarningGlyph());
|
||||
if(!address.getStyleClass().contains("error")) {
|
||||
address.getStyleClass().add("error");
|
||||
address.setDisable(true);
|
||||
}
|
||||
} else {
|
||||
lastUsed.setText("Unknown");
|
||||
lastUsed.setGraphic(null);
|
||||
address.getStyleClass().remove("error");
|
||||
address.setDisable(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
<?import tornadofx.control.Fieldset?>
|
||||
<?import tornadofx.control.Form?>
|
||||
<?import tornadofx.control.Field?>
|
||||
<?import com.sparrowwallet.sparrow.control.CopyableTextField?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import com.sparrowwallet.sparrow.control.CopyableLabel?>
|
||||
|
|
Loading…
Reference in a new issue