mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
improve fullscreen behaviour by setting dialog ownership to parent window
This commit is contained in:
parent
201900aa0e
commit
31539a27ac
32 changed files with 114 additions and 7 deletions
|
@ -451,6 +451,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
public void showIntroduction(ActionEvent event) {
|
public void showIntroduction(ActionEvent event) {
|
||||||
WelcomeDialog welcomeDialog = new WelcomeDialog();
|
WelcomeDialog welcomeDialog = new WelcomeDialog();
|
||||||
|
welcomeDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<Mode> optionalMode = welcomeDialog.showAndWait();
|
Optional<Mode> optionalMode = welcomeDialog.showAndWait();
|
||||||
if(optionalMode.isPresent() && optionalMode.get().equals(Mode.ONLINE)) {
|
if(optionalMode.isPresent() && optionalMode.get().equals(Mode.ONLINE)) {
|
||||||
openPreferences(PreferenceGroup.SERVER);
|
openPreferences(PreferenceGroup.SERVER);
|
||||||
|
@ -539,6 +540,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
public void showInstallUdevMessage() {
|
public void showInstallUdevMessage() {
|
||||||
TextAreaDialog dialog = new TextAreaDialog("sudo " + Config.get().getHwi().getAbsolutePath() + " installudevrules");
|
TextAreaDialog dialog = new TextAreaDialog("sudo " + Config.get().getHwi().getAbsolutePath() + " installudevrules");
|
||||||
|
dialog.initOwner(rootStack.getScene().getWindow());
|
||||||
dialog.setTitle("Install Udev Rules");
|
dialog.setTitle("Install Udev Rules");
|
||||||
dialog.getDialogPane().setHeaderText("Installing udev rules ensures devices can connect over USB.\nThis command requires root privileges.\nOpen a shell and enter the following:");
|
dialog.getDialogPane().setHeaderText("Installing udev rules ensures devices can connect over USB.\nThis command requires root privileges.\nOpen a shell and enter the following:");
|
||||||
dialog.showAndWait();
|
dialog.showAndWait();
|
||||||
|
@ -607,6 +609,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
public void openTransactionFromText(ActionEvent event) {
|
public void openTransactionFromText(ActionEvent event) {
|
||||||
TextAreaDialog dialog = new TextAreaDialog();
|
TextAreaDialog dialog = new TextAreaDialog();
|
||||||
|
dialog.initOwner(rootStack.getScene().getWindow());
|
||||||
dialog.setTitle("Open from text");
|
dialog.setTitle("Open from text");
|
||||||
dialog.getDialogPane().setHeaderText("Paste a transaction or PSBT:");
|
dialog.getDialogPane().setHeaderText("Paste a transaction or PSBT:");
|
||||||
Optional<String> text = dialog.showAndWait();
|
Optional<String> text = dialog.showAndWait();
|
||||||
|
@ -625,6 +628,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
public void openTransactionFromId(ActionEvent event) {
|
public void openTransactionFromId(ActionEvent event) {
|
||||||
TransactionIdDialog dialog = new TransactionIdDialog();
|
TransactionIdDialog dialog = new TransactionIdDialog();
|
||||||
|
dialog.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<Sha256Hash> optionalTxId = dialog.showAndWait();
|
Optional<Sha256Hash> optionalTxId = dialog.showAndWait();
|
||||||
if(optionalTxId.isPresent()) {
|
if(optionalTxId.isPresent()) {
|
||||||
Sha256Hash txId = optionalTxId.get();
|
Sha256Hash txId = optionalTxId.get();
|
||||||
|
@ -652,6 +656,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
public void openTransactionFromQR(ActionEvent event) {
|
public void openTransactionFromQR(ActionEvent event) {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
@ -715,6 +720,7 @@ public class AppController implements Initializable {
|
||||||
try {
|
try {
|
||||||
UR ur = UR.fromBytes(transaction.bitcoinSerialize());
|
UR ur = UR.fromBytes(transaction.bitcoinSerialize());
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(ur);
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(ur);
|
||||||
|
qrDisplayDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
log.error("Error creating UR", e);
|
log.error("Error creating UR", e);
|
||||||
|
@ -813,6 +819,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
CryptoPSBT cryptoPSBT = new CryptoPSBT(transactionTabData.getPsbt().serialize());
|
CryptoPSBT cryptoPSBT = new CryptoPSBT(transactionTabData.getPsbt().serialize());
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(cryptoPSBT.toUR());
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(cryptoPSBT.toUR());
|
||||||
|
qrDisplayDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
qrDisplayDialog.show();
|
qrDisplayDialog.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -978,6 +985,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
public void newWallet(ActionEvent event) {
|
public void newWallet(ActionEvent event) {
|
||||||
WalletNameDialog dlg = new WalletNameDialog();
|
WalletNameDialog dlg = new WalletNameDialog();
|
||||||
|
dlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<WalletNameDialog.NameAndBirthDate> optNameAndBirthDate = dlg.showAndWait();
|
Optional<WalletNameDialog.NameAndBirthDate> optNameAndBirthDate = dlg.showAndWait();
|
||||||
if(optNameAndBirthDate.isPresent()) {
|
if(optNameAndBirthDate.isPresent()) {
|
||||||
WalletNameDialog.NameAndBirthDate nameAndBirthDate = optNameAndBirthDate.get();
|
WalletNameDialog.NameAndBirthDate nameAndBirthDate = optNameAndBirthDate.get();
|
||||||
|
@ -1027,6 +1035,7 @@ public class AppController implements Initializable {
|
||||||
loadWalletService.start();
|
loadWalletService.start();
|
||||||
} else {
|
} else {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(storage.getWalletName(null), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(storage.getWalletName(null), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<SecureString> optionalPassword = dlg.showAndWait();
|
Optional<SecureString> optionalPassword = dlg.showAndWait();
|
||||||
if(optionalPassword.isEmpty()) {
|
if(optionalPassword.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -1095,6 +1104,7 @@ public class AppController implements Initializable {
|
||||||
public void importWallet(ActionEvent event) {
|
public void importWallet(ActionEvent event) {
|
||||||
List<WalletForm> selectedWalletForms = getSelectedWalletForms();
|
List<WalletForm> selectedWalletForms = getSelectedWalletForms();
|
||||||
WalletImportDialog dlg = new WalletImportDialog(selectedWalletForms);
|
WalletImportDialog dlg = new WalletImportDialog(selectedWalletForms);
|
||||||
|
dlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<Wallet> optionalWallet = dlg.showAndWait();
|
Optional<Wallet> optionalWallet = dlg.showAndWait();
|
||||||
if(optionalWallet.isPresent()) {
|
if(optionalWallet.isPresent()) {
|
||||||
Wallet wallet = optionalWallet.get();
|
Wallet wallet = optionalWallet.get();
|
||||||
|
@ -1132,6 +1142,7 @@ public class AppController implements Initializable {
|
||||||
try(FileInputStream inputStream = new FileInputStream(file)) {
|
try(FileInputStream inputStream = new FileInputStream(file)) {
|
||||||
if(importer.isEncrypted(file) && password == null) {
|
if(importer.isEncrypted(file) && password == null) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(file.getName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(file.getName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<SecureString> optionalPassword = dlg.showAndWait();
|
Optional<SecureString> optionalPassword = dlg.showAndWait();
|
||||||
if(optionalPassword.isPresent()) {
|
if(optionalPassword.isPresent()) {
|
||||||
password = optionalPassword.get();
|
password = optionalPassword.get();
|
||||||
|
@ -1154,6 +1165,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
private void addImportedWallet(Wallet wallet) {
|
private void addImportedWallet(Wallet wallet) {
|
||||||
WalletNameDialog nameDlg = new WalletNameDialog(wallet.getName(), true, wallet.getBirthDate());
|
WalletNameDialog nameDlg = new WalletNameDialog(wallet.getName(), true, wallet.getBirthDate());
|
||||||
|
nameDlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<WalletNameDialog.NameAndBirthDate> optNameAndBirthDate = nameDlg.showAndWait();
|
Optional<WalletNameDialog.NameAndBirthDate> optNameAndBirthDate = nameDlg.showAndWait();
|
||||||
if(optNameAndBirthDate.isPresent()) {
|
if(optNameAndBirthDate.isPresent()) {
|
||||||
WalletNameDialog.NameAndBirthDate nameAndBirthDate = optNameAndBirthDate.get();
|
WalletNameDialog.NameAndBirthDate nameAndBirthDate = optNameAndBirthDate.get();
|
||||||
|
@ -1199,6 +1211,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
Storage storage = new Storage(Storage.getWalletFile(wallet.getName()));
|
Storage storage = new Storage(Storage.getWalletFile(wallet.getName()));
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getName(), WalletPasswordDialog.PasswordRequirement.UPDATE_NEW);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getName(), WalletPasswordDialog.PasswordRequirement.UPDATE_NEW);
|
||||||
|
dlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
if(password.get().length() == 0) {
|
if(password.get().length() == 0) {
|
||||||
|
@ -1265,6 +1278,7 @@ public class AppController implements Initializable {
|
||||||
WalletForm selectedWalletForm = getSelectedWalletForm();
|
WalletForm selectedWalletForm = getSelectedWalletForm();
|
||||||
if(selectedWalletForm != null) {
|
if(selectedWalletForm != null) {
|
||||||
WalletExportDialog dlg = new WalletExportDialog(selectedWalletForm.getWallet());
|
WalletExportDialog dlg = new WalletExportDialog(selectedWalletForm.getWallet());
|
||||||
|
dlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<Wallet> wallet = dlg.showAndWait();
|
Optional<Wallet> wallet = dlg.showAndWait();
|
||||||
if(wallet.isPresent()) {
|
if(wallet.isPresent()) {
|
||||||
//Successful export
|
//Successful export
|
||||||
|
@ -1282,6 +1296,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
private void openPreferences(PreferenceGroup preferenceGroup) {
|
private void openPreferences(PreferenceGroup preferenceGroup) {
|
||||||
PreferencesDialog preferencesDialog = new PreferencesDialog(preferenceGroup);
|
PreferencesDialog preferencesDialog = new PreferencesDialog(preferenceGroup);
|
||||||
|
preferencesDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
preferencesDialog.showAndWait();
|
preferencesDialog.showAndWait();
|
||||||
configureSwitchServer();
|
configureSwitchServer();
|
||||||
serverToggle.setDisable(!Config.get().hasServer());
|
serverToggle.setDisable(!Config.get().hasServer());
|
||||||
|
@ -1303,6 +1318,7 @@ public class AppController implements Initializable {
|
||||||
messageSignDialog = new MessageSignDialog();
|
messageSignDialog = new MessageSignDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
messageSignDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
messageSignDialog.showAndWait();
|
messageSignDialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1323,6 +1339,7 @@ public class AppController implements Initializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
sendToManyDialog = new SendToManyDialog(bitcoinUnit);
|
sendToManyDialog = new SendToManyDialog(bitcoinUnit);
|
||||||
|
sendToManyDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
sendToManyDialog.initModality(Modality.NONE);
|
sendToManyDialog.initModality(Modality.NONE);
|
||||||
Optional<List<Payment>> optPayments = sendToManyDialog.showAndWait();
|
Optional<List<Payment>> optPayments = sendToManyDialog.showAndWait();
|
||||||
sendToManyDialog = null;
|
sendToManyDialog = null;
|
||||||
|
@ -1343,6 +1360,7 @@ public class AppController implements Initializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
PrivateKeySweepDialog dialog = new PrivateKeySweepDialog(wallet);
|
PrivateKeySweepDialog dialog = new PrivateKeySweepDialog(wallet);
|
||||||
|
dialog.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<Transaction> optTransaction = dialog.showAndWait();
|
Optional<Transaction> optTransaction = dialog.showAndWait();
|
||||||
optTransaction.ifPresent(transaction -> addTransactionTab(null, null, transaction));
|
optTransaction.ifPresent(transaction -> addTransactionTab(null, null, transaction));
|
||||||
}
|
}
|
||||||
|
@ -1356,6 +1374,7 @@ public class AppController implements Initializable {
|
||||||
if(wallet.isEncrypted()) {
|
if(wallet.isEncrypted()) {
|
||||||
Wallet copy = wallet.copy();
|
Wallet copy = wallet.copy();
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage storage = selectedWalletForm.getStorage();
|
Storage storage = selectedWalletForm.getStorage();
|
||||||
|
@ -1369,6 +1388,7 @@ public class AppController implements Initializable {
|
||||||
try {
|
try {
|
||||||
soroban.setHDWallet(copy);
|
soroban.setHDWallet(copy);
|
||||||
CounterpartyDialog counterpartyDialog = new CounterpartyDialog(selectedWalletForm.getWalletId(), selectedWalletForm.getWallet());
|
CounterpartyDialog counterpartyDialog = new CounterpartyDialog(selectedWalletForm.getWalletId(), selectedWalletForm.getWallet());
|
||||||
|
counterpartyDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
if(Config.get().isSameAppMixing()) {
|
if(Config.get().isSameAppMixing()) {
|
||||||
counterpartyDialog.initModality(Modality.NONE);
|
counterpartyDialog.initModality(Modality.NONE);
|
||||||
}
|
}
|
||||||
|
@ -1396,6 +1416,7 @@ public class AppController implements Initializable {
|
||||||
} else {
|
} else {
|
||||||
soroban.setHDWallet(wallet);
|
soroban.setHDWallet(wallet);
|
||||||
CounterpartyDialog counterpartyDialog = new CounterpartyDialog(selectedWalletForm.getWalletId(), selectedWalletForm.getWallet());
|
CounterpartyDialog counterpartyDialog = new CounterpartyDialog(selectedWalletForm.getWalletId(), selectedWalletForm.getWallet());
|
||||||
|
counterpartyDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
if(Config.get().isSameAppMixing()) {
|
if(Config.get().isSameAppMixing()) {
|
||||||
counterpartyDialog.initModality(Modality.NONE);
|
counterpartyDialog.initModality(Modality.NONE);
|
||||||
}
|
}
|
||||||
|
@ -1403,6 +1424,7 @@ public class AppController implements Initializable {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CounterpartyDialog counterpartyDialog = new CounterpartyDialog(selectedWalletForm.getWalletId(), selectedWalletForm.getWallet());
|
CounterpartyDialog counterpartyDialog = new CounterpartyDialog(selectedWalletForm.getWalletId(), selectedWalletForm.getWallet());
|
||||||
|
counterpartyDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
if(Config.get().isSameAppMixing()) {
|
if(Config.get().isSameAppMixing()) {
|
||||||
counterpartyDialog.initModality(Modality.NONE);
|
counterpartyDialog.initModality(Modality.NONE);
|
||||||
}
|
}
|
||||||
|
@ -1415,6 +1437,7 @@ public class AppController implements Initializable {
|
||||||
WalletForm selectedWalletForm = getSelectedWalletForm();
|
WalletForm selectedWalletForm = getSelectedWalletForm();
|
||||||
if(selectedWalletForm != null) {
|
if(selectedWalletForm != null) {
|
||||||
PayNymDialog payNymDialog = new PayNymDialog(selectedWalletForm.getWalletId());
|
PayNymDialog payNymDialog = new PayNymDialog(selectedWalletForm.getWalletId());
|
||||||
|
payNymDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
payNymDialog.showAndWait();
|
payNymDialog.showAndWait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1461,6 +1484,7 @@ public class AppController implements Initializable {
|
||||||
List<WalletForm> walletForms = subTabs.getTabs().stream().map(subTab -> ((WalletTabData)subTab.getUserData()).getWalletForm()).collect(Collectors.toList());
|
List<WalletForm> walletForms = subTabs.getTabs().stream().map(subTab -> ((WalletTabData)subTab.getUserData()).getWalletForm()).collect(Collectors.toList());
|
||||||
if(!walletForms.isEmpty()) {
|
if(!walletForms.isEmpty()) {
|
||||||
SearchWalletDialog searchWalletDialog = new SearchWalletDialog(walletForms);
|
SearchWalletDialog searchWalletDialog = new SearchWalletDialog(walletForms);
|
||||||
|
searchWalletDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<Entry> optEntry = searchWalletDialog.showAndWait();
|
Optional<Entry> optEntry = searchWalletDialog.showAndWait();
|
||||||
if(optEntry.isPresent()) {
|
if(optEntry.isPresent()) {
|
||||||
Entry entry = optEntry.get();
|
Entry entry = optEntry.get();
|
||||||
|
@ -1481,6 +1505,7 @@ public class AppController implements Initializable {
|
||||||
List<WalletForm> walletForms = subTabs.getTabs().stream().map(subTab -> ((WalletTabData)subTab.getUserData()).getWalletForm()).collect(Collectors.toList());
|
List<WalletForm> walletForms = subTabs.getTabs().stream().map(subTab -> ((WalletTabData)subTab.getUserData()).getWalletForm()).collect(Collectors.toList());
|
||||||
if(!walletForms.isEmpty()) {
|
if(!walletForms.isEmpty()) {
|
||||||
WalletSummaryDialog walletSummaryDialog = new WalletSummaryDialog(walletForms);
|
WalletSummaryDialog walletSummaryDialog = new WalletSummaryDialog(walletForms);
|
||||||
|
walletSummaryDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
walletSummaryDialog.showAndWait();
|
walletSummaryDialog.showAndWait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2004,6 +2029,7 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
private void renameWallet(WalletForm selectedWalletForm) {
|
private void renameWallet(WalletForm selectedWalletForm) {
|
||||||
WalletNameDialog walletNameDialog = new WalletNameDialog(selectedWalletForm.getMasterWallet().getName(), false, null, true);
|
WalletNameDialog walletNameDialog = new WalletNameDialog(selectedWalletForm.getMasterWallet().getName(), false, null, true);
|
||||||
|
walletNameDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<WalletNameDialog.NameAndBirthDate> optName = walletNameDialog.showAndWait();
|
Optional<WalletNameDialog.NameAndBirthDate> optName = walletNameDialog.showAndWait();
|
||||||
if(optName.isPresent()) {
|
if(optName.isPresent()) {
|
||||||
File walletFile = Storage.getWalletFile(optName.get().getName() + "." + PersistenceType.DB.getExtension());
|
File walletFile = Storage.getWalletFile(optName.get().getName() + "." + PersistenceType.DB.getExtension());
|
||||||
|
@ -2032,6 +2058,7 @@ public class AppController implements Initializable {
|
||||||
Storage storage = selectedWalletForm.getStorage();
|
Storage storage = selectedWalletForm.getStorage();
|
||||||
if(selectedWalletForm.getMasterWallet().isEncrypted()) {
|
if(selectedWalletForm.getMasterWallet().isEncrypted()) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(selectedWalletForm.getWallet().getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(selectedWalletForm.getWallet().getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.KeyDerivationService keyDerivationService = new Storage.KeyDerivationService(storage, password.get(), true);
|
Storage.KeyDerivationService keyDerivationService = new Storage.KeyDerivationService(storage, password.get(), true);
|
||||||
|
@ -2099,6 +2126,7 @@ public class AppController implements Initializable {
|
||||||
rename.setOnAction(event -> {
|
rename.setOnAction(event -> {
|
||||||
Label subTabLabel = (Label)subTab.getGraphic();
|
Label subTabLabel = (Label)subTab.getGraphic();
|
||||||
WalletLabelDialog walletLabelDialog = new WalletLabelDialog(subTabLabel.getText());
|
WalletLabelDialog walletLabelDialog = new WalletLabelDialog(subTabLabel.getText());
|
||||||
|
walletLabelDialog.initOwner(rootStack.getScene().getWindow());
|
||||||
Optional<String> optLabel = walletLabelDialog.showAndWait();
|
Optional<String> optLabel = walletLabelDialog.showAndWait();
|
||||||
if(optLabel.isPresent()) {
|
if(optLabel.isPresent()) {
|
||||||
String label = optLabel.get();
|
String label = optLabel.get();
|
||||||
|
|
|
@ -949,6 +949,7 @@ public class AppServices {
|
||||||
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
||||||
Wallet copy = wallet.copy();
|
Wallet copy = wallet.copy();
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(getActiveWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.KeyDerivationService keyDerivationService = new Storage.KeyDerivationService(storage, password.get(), true);
|
Storage.KeyDerivationService keyDerivationService = new Storage.KeyDerivationService(storage, password.get(), true);
|
||||||
|
@ -1011,6 +1012,7 @@ public class AppServices {
|
||||||
wallet = wallets.iterator().next();
|
wallet = wallets.iterator().next();
|
||||||
} else {
|
} else {
|
||||||
ChoiceDialog<Wallet> walletChoiceDialog = new ChoiceDialog<>(wallets.iterator().next(), wallets);
|
ChoiceDialog<Wallet> walletChoiceDialog = new ChoiceDialog<>(wallets.iterator().next(), wallets);
|
||||||
|
walletChoiceDialog.initOwner(getActiveWindow());
|
||||||
walletChoiceDialog.setTitle("Choose Wallet");
|
walletChoiceDialog.setTitle("Choose Wallet");
|
||||||
walletChoiceDialog.setHeaderText("Choose a wallet to " + actionDescription);
|
walletChoiceDialog.setHeaderText("Choose a wallet to " + actionDescription);
|
||||||
Image image = new Image("/image/sparrow-small.png");
|
Image image = new Image("/image/sparrow-small.png");
|
||||||
|
|
|
@ -15,13 +15,13 @@ import java.util.Optional;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import static com.sparrowwallet.sparrow.AppServices.moveToActiveWindowScreen;
|
import static com.sparrowwallet.sparrow.AppServices.*;
|
||||||
import static com.sparrowwallet.sparrow.AppServices.setStageIcon;
|
|
||||||
|
|
||||||
public class DefaultInteractionServices implements InteractionServices {
|
public class DefaultInteractionServices implements InteractionServices {
|
||||||
@Override
|
@Override
|
||||||
public Optional<ButtonType> showAlert(String title, String content, Alert.AlertType alertType, Node graphic, ButtonType... buttons) {
|
public Optional<ButtonType> showAlert(String title, String content, Alert.AlertType alertType, Node graphic, ButtonType... buttons) {
|
||||||
Alert alert = new Alert(alertType, content, buttons);
|
Alert alert = new Alert(alertType, content, buttons);
|
||||||
|
alert.initOwner(getActiveWindow());
|
||||||
setStageIcon(alert.getDialogPane().getScene().getWindow());
|
setStageIcon(alert.getDialogPane().getScene().getWindow());
|
||||||
alert.getDialogPane().getScene().getStylesheets().add(AppServices.class.getResource("general.css").toExternalForm());
|
alert.getDialogPane().getScene().getStylesheets().add(AppServices.class.getResource("general.css").toExternalForm());
|
||||||
alert.setTitle(title);
|
alert.setTitle(title);
|
||||||
|
@ -62,6 +62,7 @@ public class DefaultInteractionServices implements InteractionServices {
|
||||||
@Override
|
@Override
|
||||||
public Optional<String> requestPassphrase(String walletName, Keystore keystore) {
|
public Optional<String> requestPassphrase(String walletName, Keystore keystore) {
|
||||||
KeystorePassphraseDialog passphraseDialog = new KeystorePassphraseDialog(walletName, keystore);
|
KeystorePassphraseDialog passphraseDialog = new KeystorePassphraseDialog(walletName, keystore);
|
||||||
|
passphraseDialog.initOwner(getActiveWindow());
|
||||||
return passphraseDialog.showAndWait();
|
return passphraseDialog.showAndWait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class AddressCell extends TreeTableCell<Entry, UtxoEntry.AddressStatus> {
|
||||||
if(utxoEntry != null) {
|
if(utxoEntry != null) {
|
||||||
Address address = addressStatus.getAddress();
|
Address address = addressStatus.getAddress();
|
||||||
setText(address.toString());
|
setText(address.toString());
|
||||||
setContextMenu(new EntryCell.AddressContextMenu(address, utxoEntry.getOutputDescriptor(), new NodeEntry(utxoEntry.getWallet(), utxoEntry.getNode()), false));
|
setContextMenu(new EntryCell.AddressContextMenu(address, utxoEntry.getOutputDescriptor(), new NodeEntry(utxoEntry.getWallet(), utxoEntry.getNode()), false, getTreeTableView()));
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
tooltip.setShowDelay(Duration.millis(250));
|
tooltip.setShowDelay(Duration.millis(250));
|
||||||
tooltip.setText(getTooltipText(utxoEntry, addressStatus.isDuplicate(), addressStatus.isDustAttack()));
|
tooltip.setText(getTooltipText(utxoEntry, addressStatus.isDuplicate(), addressStatus.isDustAttack()));
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class CoinTreeTable extends TreeTableView<Entry> {
|
||||||
hyperlink.setTranslateY(30);
|
hyperlink.setTranslateY(30);
|
||||||
hyperlink.setOnAction(event -> {
|
hyperlink.setOnAction(event -> {
|
||||||
WalletBirthDateDialog dlg = new WalletBirthDateDialog(wallet.getBirthDate(), false);
|
WalletBirthDateDialog dlg = new WalletBirthDateDialog(wallet.getBirthDate(), false);
|
||||||
|
dlg.initOwner(this.getScene().getWindow());
|
||||||
Optional<Date> optDate = dlg.showAndWait();
|
Optional<Date> optDate = dlg.showAndWait();
|
||||||
if(optDate.isPresent()) {
|
if(optDate.isPresent()) {
|
||||||
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> implements Confirmati
|
||||||
NodeEntry nodeEntry = (NodeEntry)entry;
|
NodeEntry nodeEntry = (NodeEntry)entry;
|
||||||
Address address = nodeEntry.getAddress();
|
Address address = nodeEntry.getAddress();
|
||||||
setText(address.toString());
|
setText(address.toString());
|
||||||
setContextMenu(new AddressContextMenu(address, nodeEntry.getOutputDescriptor(), nodeEntry, true));
|
setContextMenu(new AddressContextMenu(address, nodeEntry.getOutputDescriptor(), nodeEntry, true, getTreeTableView()));
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
tooltip.setShowDelay(Duration.millis(250));
|
tooltip.setShowDelay(Duration.millis(250));
|
||||||
tooltip.setText(nodeEntry.getNode().toString());
|
tooltip.setText(nodeEntry.getNode().toString());
|
||||||
|
@ -149,6 +149,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> implements Confirmati
|
||||||
signMessageButton.setGraphic(getSignMessageGlyph());
|
signMessageButton.setGraphic(getSignMessageGlyph());
|
||||||
signMessageButton.setOnAction(event -> {
|
signMessageButton.setOnAction(event -> {
|
||||||
MessageSignDialog messageSignDialog = new MessageSignDialog(nodeEntry.getWallet(), nodeEntry.getNode());
|
MessageSignDialog messageSignDialog = new MessageSignDialog(nodeEntry.getWallet(), nodeEntry.getNode());
|
||||||
|
messageSignDialog.initOwner(getTreeTableView().getScene().getWindow());
|
||||||
messageSignDialog.showAndWait();
|
messageSignDialog.showAndWait();
|
||||||
});
|
});
|
||||||
actionBox.getChildren().add(signMessageButton);
|
actionBox.getChildren().add(signMessageButton);
|
||||||
|
@ -645,7 +646,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> implements Confirmati
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class AddressContextMenu extends ContextMenu {
|
public static class AddressContextMenu extends ContextMenu {
|
||||||
public AddressContextMenu(Address address, String outputDescriptor, NodeEntry nodeEntry, boolean addUtxoItems) {
|
public AddressContextMenu(Address address, String outputDescriptor, NodeEntry nodeEntry, boolean addUtxoItems, TreeTableView<Entry> treetable) {
|
||||||
if(nodeEntry == null || !nodeEntry.getWallet().isBip47()) {
|
if(nodeEntry == null || !nodeEntry.getWallet().isBip47()) {
|
||||||
MenuItem receiveToAddress = new MenuItem("Receive To");
|
MenuItem receiveToAddress = new MenuItem("Receive To");
|
||||||
receiveToAddress.setGraphic(getReceiveGlyph());
|
receiveToAddress.setGraphic(getReceiveGlyph());
|
||||||
|
@ -663,6 +664,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> implements Confirmati
|
||||||
signVerifyMessage.setOnAction(AE -> {
|
signVerifyMessage.setOnAction(AE -> {
|
||||||
hide();
|
hide();
|
||||||
MessageSignDialog messageSignDialog = new MessageSignDialog(nodeEntry.getWallet(), nodeEntry.getNode());
|
MessageSignDialog messageSignDialog = new MessageSignDialog(nodeEntry.getWallet(), nodeEntry.getNode());
|
||||||
|
messageSignDialog.initOwner(treetable.getScene().getWindow());
|
||||||
messageSignDialog.showAndWait();
|
messageSignDialog.showAndWait();
|
||||||
});
|
});
|
||||||
getItems().add(signVerifyMessage);
|
getItems().add(signVerifyMessage);
|
||||||
|
|
|
@ -150,6 +150,7 @@ public abstract class FileImportPane extends TitledDescriptionPane {
|
||||||
|
|
||||||
private void importQR() {
|
private void importQR() {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(this.getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
|
|
@ -116,6 +116,7 @@ public class FileKeystoreExportPane extends TitledDescriptionPane {
|
||||||
|
|
||||||
if(keystore.getSource() == KeystoreSource.HW_USB || keystore.getWalletModel().isCard()) {
|
if(keystore.getSource() == KeystoreSource.HW_USB || keystore.getWalletModel().isCard()) {
|
||||||
TextAreaDialog dialog = new TextAreaDialog(message, false);
|
TextAreaDialog dialog = new TextAreaDialog(message, false);
|
||||||
|
dialog.initOwner(this.getScene().getWindow());
|
||||||
dialog.setTitle("Sign " + exporter.getName() + " Export");
|
dialog.setTitle("Sign " + exporter.getName() + " Export");
|
||||||
dialog.getDialogPane().setHeaderText("The following text needs to be signed by the device.\nClick OK to continue.");
|
dialog.getDialogPane().setHeaderText("The following text needs to be signed by the device.\nClick OK to continue.");
|
||||||
dialog.showAndWait();
|
dialog.showAndWait();
|
||||||
|
@ -126,6 +127,7 @@ public class FileKeystoreExportPane extends TitledDescriptionPane {
|
||||||
List<String> operationFingerprints = List.of(keystore.getKeyDerivation().getMasterFingerprint());
|
List<String> operationFingerprints = List.of(keystore.getKeyDerivation().getMasterFingerprint());
|
||||||
|
|
||||||
DeviceSignMessageDialog deviceSignMessageDialog = new DeviceSignMessageDialog(operationFingerprints, wallet, message, keystore.getKeyDerivation());
|
DeviceSignMessageDialog deviceSignMessageDialog = new DeviceSignMessageDialog(operationFingerprints, wallet, message, keystore.getKeyDerivation());
|
||||||
|
deviceSignMessageDialog.initOwner(this.getScene().getWindow());
|
||||||
Optional<String> optSignature = deviceSignMessageDialog.showAndWait();
|
Optional<String> optSignature = deviceSignMessageDialog.showAndWait();
|
||||||
if(optSignature.isPresent()) {
|
if(optSignature.isPresent()) {
|
||||||
exporter.addSignature(keystore, optSignature.get(), baos);
|
exporter.addSignature(keystore, optSignature.get(), baos);
|
||||||
|
@ -155,6 +157,7 @@ public class FileKeystoreExportPane extends TitledDescriptionPane {
|
||||||
} else {
|
} else {
|
||||||
qrDisplayDialog = new QRDisplayDialog(baos.toString(StandardCharsets.UTF_8));
|
qrDisplayDialog = new QRDisplayDialog(baos.toString(StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
qrDisplayDialog.initOwner(buttonBox.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
}
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
|
|
@ -111,6 +111,7 @@ public class FileWalletExportPane extends TitledDescriptionPane {
|
||||||
if(wallet.isEncrypted() && exporter.walletExportRequiresDecryption()) {
|
if(wallet.isEncrypted() && exporter.walletExportRequiresDecryption()) {
|
||||||
Wallet copy = wallet.copy();
|
Wallet copy = wallet.copy();
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(buttonBox.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
final String walletId = AppServices.get().getOpenWallets().get(wallet).getWalletId(wallet);
|
final String walletId = AppServices.get().getOpenWallets().get(wallet).getWalletId(wallet);
|
||||||
|
@ -155,6 +156,7 @@ public class FileWalletExportPane extends TitledDescriptionPane {
|
||||||
} else {
|
} else {
|
||||||
qrDisplayDialog = new QRDisplayDialog(outputStream.toString(StandardCharsets.UTF_8));
|
qrDisplayDialog = new QRDisplayDialog(outputStream.toString(StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
qrDisplayDialog.initOwner(buttonBox.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
}
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
|
|
@ -384,6 +384,7 @@ public class MessageSignDialog extends Dialog<ButtonBar.ButtonData> {
|
||||||
List<String> fingerprints = List.of(deviceWallet.getKeystores().get(0).getKeyDerivation().getMasterFingerprint());
|
List<String> fingerprints = List.of(deviceWallet.getKeystores().get(0).getKeyDerivation().getMasterFingerprint());
|
||||||
KeyDerivation fullDerivation = deviceWallet.getKeystores().get(0).getKeyDerivation().extend(walletNode.getDerivation());
|
KeyDerivation fullDerivation = deviceWallet.getKeystores().get(0).getKeyDerivation().extend(walletNode.getDerivation());
|
||||||
DeviceSignMessageDialog deviceSignMessageDialog = new DeviceSignMessageDialog(fingerprints, deviceWallet, message.getText().trim(), fullDerivation);
|
DeviceSignMessageDialog deviceSignMessageDialog = new DeviceSignMessageDialog(fingerprints, deviceWallet, message.getText().trim(), fullDerivation);
|
||||||
|
deviceSignMessageDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<String> optSignature = deviceSignMessageDialog.showAndWait();
|
Optional<String> optSignature = deviceSignMessageDialog.showAndWait();
|
||||||
if(optSignature.isPresent()) {
|
if(optSignature.isPresent()) {
|
||||||
signature.clear();
|
signature.clear();
|
||||||
|
@ -468,6 +469,7 @@ public class MessageSignDialog extends Dialog<ButtonBar.ButtonData> {
|
||||||
|
|
||||||
String qrText = "signmessage " + derivationPath + " ascii:" + message.getText().trim();
|
String qrText = "signmessage " + derivationPath + " ascii:" + message.getText().trim();
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(qrText, true);
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(qrText, true);
|
||||||
|
qrDisplayDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<ButtonType> optButtonType = qrDisplayDialog.showAndWait();
|
Optional<ButtonType> optButtonType = qrDisplayDialog.showAndWait();
|
||||||
if(optButtonType.isPresent() && optButtonType.get().getButtonData() == ButtonBar.ButtonData.NEXT_FORWARD) {
|
if(optButtonType.isPresent() && optButtonType.get().getButtonData() == ButtonBar.ButtonData.NEXT_FORWARD) {
|
||||||
scanQr();
|
scanQr();
|
||||||
|
@ -476,6 +478,7 @@ public class MessageSignDialog extends Dialog<ButtonBar.ButtonData> {
|
||||||
|
|
||||||
private void scanQr() {
|
private void scanQr() {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
@ -517,6 +520,7 @@ public class MessageSignDialog extends Dialog<ButtonBar.ButtonData> {
|
||||||
}
|
}
|
||||||
|
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(walletNode.getWallet().copy(), password.get());
|
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(walletNode.getWallet().copy(), password.get());
|
||||||
|
|
|
@ -281,6 +281,7 @@ public class MnemonicGridDialog extends Dialog<List<String>> {
|
||||||
ButtonBar.setButtonData(generateButton, buttonData);
|
ButtonBar.setButtonData(generateButton, buttonData);
|
||||||
generateButton.setOnAction(event -> {
|
generateButton.setOnAction(event -> {
|
||||||
SeedEntryDialog seedEntryDialog = new SeedEntryDialog("Border Wallets Entropy Grid Recovery Seed", 12);
|
SeedEntryDialog seedEntryDialog = new SeedEntryDialog("Border Wallets Entropy Grid Recovery Seed", 12);
|
||||||
|
seedEntryDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<List<String>> optWords = seedEntryDialog.showAndWait();
|
Optional<List<String>> optWords = seedEntryDialog.showAndWait();
|
||||||
if(optWords.isPresent()) {
|
if(optWords.isPresent()) {
|
||||||
List<String> mnemonicWords = optWords.get();
|
List<String> mnemonicWords = optWords.get();
|
||||||
|
|
|
@ -254,6 +254,7 @@ public class MnemonicKeystoreImportPane extends MnemonicKeystorePane {
|
||||||
if(!dryrun) {
|
if(!dryrun) {
|
||||||
if(passphraseProperty.get() != null && !passphraseProperty.get().isEmpty()) {
|
if(passphraseProperty.get() != null && !passphraseProperty.get().isEmpty()) {
|
||||||
KeystorePassphraseDialog keystorePassphraseDialog = new KeystorePassphraseDialog(null, keystore, true);
|
KeystorePassphraseDialog keystorePassphraseDialog = new KeystorePassphraseDialog(null, keystore, true);
|
||||||
|
keystorePassphraseDialog.initOwner(this.getScene().getWindow());
|
||||||
Optional<String> optPassphrase = keystorePassphraseDialog.showAndWait();
|
Optional<String> optPassphrase = keystorePassphraseDialog.showAndWait();
|
||||||
if(optPassphrase.isEmpty() || !optPassphrase.get().equals(passphraseProperty.get())) {
|
if(optPassphrase.isEmpty() || !optPassphrase.get().equals(passphraseProperty.get())) {
|
||||||
throw new ImportException("Re-entered passphrase did not match");
|
throw new ImportException("Re-entered passphrase did not match");
|
||||||
|
|
|
@ -97,6 +97,7 @@ public class MnemonicKeystorePane extends TitledDescriptionPane {
|
||||||
|
|
||||||
protected void showGrid() {
|
protected void showGrid() {
|
||||||
MnemonicGridDialog mnemonicGridDialog = new MnemonicGridDialog();
|
MnemonicGridDialog mnemonicGridDialog = new MnemonicGridDialog();
|
||||||
|
mnemonicGridDialog.initOwner(this.getScene().getWindow());
|
||||||
Optional<List<String>> optWords = mnemonicGridDialog.showAndWait();
|
Optional<List<String>> optWords = mnemonicGridDialog.showAndWait();
|
||||||
if(optWords.isPresent()) {
|
if(optWords.isPresent()) {
|
||||||
List<String> words = optWords.get();
|
List<String> words = optWords.get();
|
||||||
|
@ -134,6 +135,7 @@ public class MnemonicKeystorePane extends TitledDescriptionPane {
|
||||||
|
|
||||||
protected void scanQR() {
|
protected void scanQR() {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(this.getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
|
|
@ -110,6 +110,7 @@ public class PayNymCell extends ListCell<PayNym> {
|
||||||
MenuItem rename = new MenuItem("Rename Contact...");
|
MenuItem rename = new MenuItem("Rename Contact...");
|
||||||
rename.setOnAction(event -> {
|
rename.setOnAction(event -> {
|
||||||
WalletLabelDialog walletLabelDialog = new WalletLabelDialog(payNym.nymName(), "Contact");
|
WalletLabelDialog walletLabelDialog = new WalletLabelDialog(payNym.nymName(), "Contact");
|
||||||
|
walletLabelDialog.initOwner(PayNymCell.this.getScene().getWindow());
|
||||||
Optional<String> optLabel = walletLabelDialog.showAndWait();
|
Optional<String> optLabel = walletLabelDialog.showAndWait();
|
||||||
if(optLabel.isPresent()) {
|
if(optLabel.isPresent()) {
|
||||||
int index = getListView().getItems().indexOf(payNym);
|
int index = getListView().getItems().indexOf(payNym);
|
||||||
|
|
|
@ -224,6 +224,7 @@ public class PrivateKeySweepDialog extends Dialog<Transaction> {
|
||||||
|
|
||||||
private void decryptKey() {
|
private void decryptKey() {
|
||||||
PassphraseDialog passphraseDialog = new PassphraseDialog();
|
PassphraseDialog passphraseDialog = new PassphraseDialog();
|
||||||
|
passphraseDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<String> optPassphrase = passphraseDialog.showAndWait();
|
Optional<String> optPassphrase = passphraseDialog.showAndWait();
|
||||||
if(optPassphrase.isPresent()) {
|
if(optPassphrase.isPresent()) {
|
||||||
try {
|
try {
|
||||||
|
@ -265,6 +266,7 @@ public class PrivateKeySweepDialog extends Dialog<Transaction> {
|
||||||
|
|
||||||
private void scanPrivateKey() {
|
private void scanPrivateKey() {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> result = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> result = qrScanDialog.showAndWait();
|
||||||
if(result.isPresent() && result.get().payload != null) {
|
if(result.isPresent() && result.get().payload != null) {
|
||||||
key.setText(result.get().payload);
|
key.setText(result.get().payload);
|
||||||
|
@ -294,6 +296,7 @@ public class PrivateKeySweepDialog extends Dialog<Transaction> {
|
||||||
|
|
||||||
private void unsealPrivateKey() {
|
private void unsealPrivateKey() {
|
||||||
DeviceUnsealDialog deviceUnsealDialog = new DeviceUnsealDialog(Collections.emptyList());
|
DeviceUnsealDialog deviceUnsealDialog = new DeviceUnsealDialog(Collections.emptyList());
|
||||||
|
deviceUnsealDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<DeviceUnsealDialog.DevicePrivateKey> optPrivateKey = deviceUnsealDialog.showAndWait();
|
Optional<DeviceUnsealDialog.DevicePrivateKey> optPrivateKey = deviceUnsealDialog.showAndWait();
|
||||||
if(optPrivateKey.isPresent()) {
|
if(optPrivateKey.isPresent()) {
|
||||||
DeviceUnsealDialog.DevicePrivateKey devicePrivateKey = optPrivateKey.get();
|
DeviceUnsealDialog.DevicePrivateKey devicePrivateKey = optPrivateKey.get();
|
||||||
|
@ -312,6 +315,7 @@ public class PrivateKeySweepDialog extends Dialog<Transaction> {
|
||||||
Date since = null;
|
Date since = null;
|
||||||
if(Config.get().getServerType() == ServerType.BITCOIN_CORE) {
|
if(Config.get().getServerType() == ServerType.BITCOIN_CORE) {
|
||||||
WalletBirthDateDialog addressScanDateDialog = new WalletBirthDateDialog(null, true);
|
WalletBirthDateDialog addressScanDateDialog = new WalletBirthDateDialog(null, true);
|
||||||
|
addressScanDateDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<Date> optSince = addressScanDateDialog.showAndWait();
|
Optional<Date> optSince = addressScanDateDialog.showAndWait();
|
||||||
if(optSince.isPresent()) {
|
if(optSince.isPresent()) {
|
||||||
since = optSince.get();
|
since = optSince.get();
|
||||||
|
@ -330,6 +334,7 @@ public class PrivateKeySweepDialog extends Dialog<Transaction> {
|
||||||
|
|
||||||
if(Config.get().getServerType() == ServerType.BITCOIN_CORE) {
|
if(Config.get().getServerType() == ServerType.BITCOIN_CORE) {
|
||||||
ServiceProgressDialog serviceProgressDialog = new ServiceProgressDialog("Address Scan", "Scanning address for transactions...", "/image/sparrow.png", addressUtxosService);
|
ServiceProgressDialog serviceProgressDialog = new ServiceProgressDialog("Address Scan", "Scanning address for transactions...", "/image/sparrow.png", addressUtxosService);
|
||||||
|
serviceProgressDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
AppServices.moveToActiveWindowScreen(serviceProgressDialog);
|
AppServices.moveToActiveWindowScreen(serviceProgressDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class TextAreaDialog extends Dialog<String> {
|
||||||
ButtonBar.setButtonData(scanButton, buttonData);
|
ButtonBar.setButtonData(scanButton, buttonData);
|
||||||
scanButton.setOnAction(event -> {
|
scanButton.setOnAction(event -> {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
|
|
@ -1301,7 +1301,7 @@ public class TransactionDiagram extends GridPane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class LabelContextMenu extends ContextMenu {
|
private class LabelContextMenu extends ContextMenu {
|
||||||
public LabelContextMenu(Address address, long value) {
|
public LabelContextMenu(Address address, long value) {
|
||||||
if(address != null) {
|
if(address != null) {
|
||||||
MenuItem copyAddress = new MenuItem("Copy Address");
|
MenuItem copyAddress = new MenuItem("Copy Address");
|
||||||
|
@ -1317,6 +1317,7 @@ public class TransactionDiagram extends GridPane {
|
||||||
showAddress.setOnAction(event -> {
|
showAddress.setOnAction(event -> {
|
||||||
hide();
|
hide();
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(address.toString());
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(address.toString());
|
||||||
|
qrDisplayDialog.initOwner(TransactionDiagram.this.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
});
|
});
|
||||||
getItems().add(showAddress);
|
getItems().add(showAddress);
|
||||||
|
|
|
@ -8,7 +8,6 @@ import com.sparrowwallet.drongo.wallet.StandardAccount;
|
||||||
import com.sparrowwallet.drongo.wallet.Wallet;
|
import com.sparrowwallet.drongo.wallet.Wallet;
|
||||||
import com.sparrowwallet.sparrow.AppServices;
|
import com.sparrowwallet.sparrow.AppServices;
|
||||||
import com.sparrowwallet.sparrow.SparrowWallet;
|
import com.sparrowwallet.sparrow.SparrowWallet;
|
||||||
import com.sparrowwallet.sparrow.control.WalletPasswordDialog;
|
|
||||||
import com.sparrowwallet.sparrow.soroban.Soroban;
|
import com.sparrowwallet.sparrow.soroban.Soroban;
|
||||||
import com.sparrowwallet.sparrow.whirlpool.Whirlpool;
|
import com.sparrowwallet.sparrow.whirlpool.Whirlpool;
|
||||||
import javafx.concurrent.ScheduledService;
|
import javafx.concurrent.ScheduledService;
|
||||||
|
|
|
@ -243,11 +243,13 @@ public class PayNymController {
|
||||||
|
|
||||||
public void showQR(ActionEvent event) {
|
public void showQR(ActionEvent event) {
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(getMasterWallet().getPaymentCode().toString());
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(getMasterWallet().getPaymentCode().toString());
|
||||||
|
qrDisplayDialog.initOwner(payNymName.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void scanQR(ActionEvent event) {
|
public void scanQR(ActionEvent event) {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(payNymName.getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optResult = qrScanDialog.showAndWait();
|
||||||
if(optResult.isPresent()) {
|
if(optResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optResult.get();
|
QRScanDialog.Result result = optResult.get();
|
||||||
|
@ -373,6 +375,7 @@ public class PayNymController {
|
||||||
Optional<ButtonType> optButtonType = AppServices.showAlertDialog("Link contacts?", "Some contacts were found that may be already linked. Link these contacts? Your password is required to check.", Alert.AlertType.CONFIRMATION, ButtonType.NO, ButtonType.YES);
|
Optional<ButtonType> optButtonType = AppServices.showAlertDialog("Link contacts?", "Some contacts were found that may be already linked. Link these contacts? Your password is required to check.", Alert.AlertType.CONFIRMATION, ButtonType.NO, ButtonType.YES);
|
||||||
if(optButtonType.isPresent() && optButtonType.get() == ButtonType.YES) {
|
if(optButtonType.isPresent() && optButtonType.get() == ButtonType.YES) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(payNymName.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(wallet.copy(), password.get());
|
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(wallet.copy(), password.get());
|
||||||
|
@ -495,6 +498,7 @@ public class PayNymController {
|
||||||
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
||||||
if(wallet.isEncrypted()) {
|
if(wallet.isEncrypted()) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(payNymName.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(wallet.copy(), password.get());
|
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(wallet.copy(), password.get());
|
||||||
|
|
|
@ -118,6 +118,7 @@ public class GeneralPreferencesController extends PreferencesDetailController {
|
||||||
if(newValue != null) {
|
if(newValue != null) {
|
||||||
if(newValue == CUSTOM_BLOCK_EXPLORER) {
|
if(newValue == CUSTOM_BLOCK_EXPLORER) {
|
||||||
TextfieldDialog textfieldDialog = new TextfieldDialog();
|
TextfieldDialog textfieldDialog = new TextfieldDialog();
|
||||||
|
textfieldDialog.initOwner(blockExplorers.getScene().getWindow());
|
||||||
textfieldDialog.setTitle("Enter Block Explorer URL");
|
textfieldDialog.setTitle("Enter Block Explorer URL");
|
||||||
textfieldDialog.setHeaderText("Enter the URL of the block explorer.\n\nIf present, the characters {0} will be replaced with the txid.\nFor example, https://localhost or https://localhost/tx/{0}\n");
|
textfieldDialog.setHeaderText("Enter the URL of the block explorer.\n\nIf present, the characters {0} will be replaced with the txid.\nFor example, https://localhost or https://localhost/tx/{0}\n");
|
||||||
textfieldDialog.getEditor().setPromptText("https://localhost");
|
textfieldDialog.getEditor().setPromptText("https://localhost");
|
||||||
|
|
|
@ -282,6 +282,7 @@ public class ServerPreferencesController extends PreferencesDetailController {
|
||||||
if(newValue != null) {
|
if(newValue != null) {
|
||||||
if(newValue == MANAGE_ALIASES_SERVER) {
|
if(newValue == MANAGE_ALIASES_SERVER) {
|
||||||
ServerAliasDialog serverAliasDialog = new ServerAliasDialog(ServerType.BITCOIN_CORE);
|
ServerAliasDialog serverAliasDialog = new ServerAliasDialog(ServerType.BITCOIN_CORE);
|
||||||
|
serverAliasDialog.initOwner(recentCoreServers.getScene().getWindow());
|
||||||
Optional<Server> optServer = serverAliasDialog.showAndWait();
|
Optional<Server> optServer = serverAliasDialog.showAndWait();
|
||||||
recentCoreServers.setItems(getObservableServerList(Config.get().getRecentCoreServers()));
|
recentCoreServers.setItems(getObservableServerList(Config.get().getRecentCoreServers()));
|
||||||
Server selectedServer = optServer.orElseGet(() -> Config.get().getCoreServer());
|
Server selectedServer = optServer.orElseGet(() -> Config.get().getCoreServer());
|
||||||
|
@ -306,6 +307,7 @@ public class ServerPreferencesController extends PreferencesDetailController {
|
||||||
if(newValue != null) {
|
if(newValue != null) {
|
||||||
if(newValue == MANAGE_ALIASES_SERVER) {
|
if(newValue == MANAGE_ALIASES_SERVER) {
|
||||||
ServerAliasDialog serverAliasDialog = new ServerAliasDialog(ServerType.ELECTRUM_SERVER);
|
ServerAliasDialog serverAliasDialog = new ServerAliasDialog(ServerType.ELECTRUM_SERVER);
|
||||||
|
serverAliasDialog.initOwner(recentElectrumServers.getScene().getWindow());
|
||||||
Optional<Server> optServer = serverAliasDialog.showAndWait();
|
Optional<Server> optServer = serverAliasDialog.showAndWait();
|
||||||
recentElectrumServers.setItems(getObservableServerList(Config.get().getRecentElectrumServers()));
|
recentElectrumServers.setItems(getObservableServerList(Config.get().getRecentElectrumServers()));
|
||||||
Server selectedServer = optServer.orElseGet(() -> Config.get().getElectrumServer());
|
Server selectedServer = optServer.orElseGet(() -> Config.get().getElectrumServer());
|
||||||
|
|
|
@ -409,12 +409,14 @@ public class CounterpartyController extends SorobanController {
|
||||||
|
|
||||||
public void showPayNym(ActionEvent event) {
|
public void showPayNym(ActionEvent event) {
|
||||||
PayNymDialog payNymDialog = new PayNymDialog(walletId);
|
PayNymDialog payNymDialog = new PayNymDialog(walletId);
|
||||||
|
payNymDialog.initOwner(payNym.getScene().getWindow());
|
||||||
payNymDialog.showAndWait();
|
payNymDialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showPayNymQR(ActionEvent event) {
|
public void showPayNymQR(ActionEvent event) {
|
||||||
Wallet masterWallet = wallet.isMasterWallet() ? wallet : wallet.getMasterWallet();
|
Wallet masterWallet = wallet.isMasterWallet() ? wallet : wallet.getMasterWallet();
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(masterWallet.getPaymentCode().toString());
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(masterWallet.getPaymentCode().toString());
|
||||||
|
qrDisplayDialog.initOwner(payNym.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -363,6 +363,7 @@ public class InitiatorController extends SorobanController {
|
||||||
if(wallet.isEncrypted()) {
|
if(wallet.isEncrypted()) {
|
||||||
Wallet copy = wallet.copy();
|
Wallet copy = wallet.copy();
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(payNymFollowers.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
||||||
|
@ -649,6 +650,7 @@ public class InitiatorController extends SorobanController {
|
||||||
|
|
||||||
public void findPayNym(ActionEvent event) {
|
public void findPayNym(ActionEvent event) {
|
||||||
PayNymDialog payNymDialog = new PayNymDialog(walletId, PayNymDialog.Operation.SELECT, false);
|
PayNymDialog payNymDialog = new PayNymDialog(walletId, PayNymDialog.Operation.SELECT, false);
|
||||||
|
payNymDialog.initOwner(payNymFollowers.getScene().getWindow());
|
||||||
Optional<PayNym> optPayNym = payNymDialog.showAndWait();
|
Optional<PayNym> optPayNym = payNymDialog.showAndWait();
|
||||||
optPayNym.ifPresent(payNym -> {
|
optPayNym.ifPresent(payNym -> {
|
||||||
counterpartyPayNymName.set(payNym.nymName());
|
counterpartyPayNymName.set(payNym.nymName());
|
||||||
|
|
|
@ -137,6 +137,7 @@ public class InitiatorDialog extends Dialog<Transaction> {
|
||||||
private void acceptAndBroadcast(InitiatorController initiatorController, String walletId, Wallet wallet) {
|
private void acceptAndBroadcast(InitiatorController initiatorController, String walletId, Wallet wallet) {
|
||||||
if(confirmationRequired && wallet.isEncrypted()) {
|
if(confirmationRequired && wallet.isEncrypted()) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(getDialogPane().getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
||||||
|
|
|
@ -875,6 +875,7 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
boolean includeNonWitnessUtxos = !Arrays.asList(ScriptType.WITNESS_TYPES).contains(headersForm.getSigningWallet().getScriptType());
|
boolean includeNonWitnessUtxos = !Arrays.asList(ScriptType.WITNESS_TYPES).contains(headersForm.getSigningWallet().getScriptType());
|
||||||
CryptoPSBT cryptoPSBT = new CryptoPSBT(headersForm.getPsbt().serialize(true, includeNonWitnessUtxos));
|
CryptoPSBT cryptoPSBT = new CryptoPSBT(headersForm.getPsbt().serialize(true, includeNonWitnessUtxos));
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(cryptoPSBT.toUR(), addLegacyEncodingOption, true);
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(cryptoPSBT.toUR(), addLegacyEncodingOption, true);
|
||||||
|
qrDisplayDialog.initOwner(toggleButton.getScene().getWindow());
|
||||||
Optional<ButtonType> optButtonType = qrDisplayDialog.showAndWait();
|
Optional<ButtonType> optButtonType = qrDisplayDialog.showAndWait();
|
||||||
if(optButtonType.isPresent() && optButtonType.get().getButtonData() == ButtonBar.ButtonData.NEXT_FORWARD) {
|
if(optButtonType.isPresent() && optButtonType.get().getButtonData() == ButtonBar.ButtonData.NEXT_FORWARD) {
|
||||||
scanPSBT(event);
|
scanPSBT(event);
|
||||||
|
@ -886,6 +887,7 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
toggleButton.setSelected(false);
|
toggleButton.setSelected(false);
|
||||||
|
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(toggleButton.getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
@ -985,6 +987,7 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
|
|
||||||
if(copy.isEncrypted()) {
|
if(copy.isEncrypted()) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(signButton.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(copy, password.get());
|
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(copy, password.get());
|
||||||
|
@ -1029,6 +1032,7 @@ public class HeadersController extends TransactionFormController implements Init
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceSignDialog dlg = new DeviceSignDialog(headersForm.getSigningWallet(), fingerprints, headersForm.getPsbt());
|
DeviceSignDialog dlg = new DeviceSignDialog(headersForm.getSigningWallet(), fingerprints, headersForm.getPsbt());
|
||||||
|
dlg.initOwner(signButton.getScene().getWindow());
|
||||||
dlg.initModality(Modality.NONE);
|
dlg.initModality(Modality.NONE);
|
||||||
Stage stage = (Stage)dlg.getDialogPane().getScene().getWindow();
|
Stage stage = (Stage)dlg.getDialogPane().getScene().getWindow();
|
||||||
stage.setAlwaysOnTop(true);
|
stage.setAlwaysOnTop(true);
|
||||||
|
|
|
@ -176,6 +176,7 @@ public class AddressesController extends WalletFormController implements Initial
|
||||||
|
|
||||||
public void showPayNymAddresses(ActionEvent event) {
|
public void showPayNymAddresses(ActionEvent event) {
|
||||||
PayNymAddressesDialog payNymAddressesDialog = new PayNymAddressesDialog(getWalletForm());
|
PayNymAddressesDialog payNymAddressesDialog = new PayNymAddressesDialog(getWalletForm());
|
||||||
|
payNymAddressesDialog.initOwner(showPayNymAddresses.getScene().getWindow());
|
||||||
payNymAddressesDialog.showAndWait();
|
payNymAddressesDialog.showAndWait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,6 +366,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
KeyDerivation requiredDerivation = restrictSource ? keystore.getKeyDerivation() : null;
|
KeyDerivation requiredDerivation = restrictSource ? keystore.getKeyDerivation() : null;
|
||||||
WalletModel requiredModel = restrictSource ? keystore.getWalletModel() : null;
|
WalletModel requiredModel = restrictSource ? keystore.getWalletModel() : null;
|
||||||
KeystoreImportDialog dlg = new KeystoreImportDialog(getWalletForm().getWallet(), initialSource, requiredDerivation, requiredModel, restrictSource);
|
KeystoreImportDialog dlg = new KeystoreImportDialog(getWalletForm().getWallet(), initialSource, requiredDerivation, requiredModel, restrictSource);
|
||||||
|
dlg.initOwner(selectSourcePane.getScene().getWindow());
|
||||||
Optional<Keystore> result = dlg.showAndWait();
|
Optional<Keystore> result = dlg.showAndWait();
|
||||||
if(result.isPresent()) {
|
if(result.isPresent()) {
|
||||||
selectSourcePane.setVisible(false);
|
selectSourcePane.setVisible(false);
|
||||||
|
@ -405,6 +406,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
|
|
||||||
public void export(ActionEvent event) {
|
public void export(ActionEvent event) {
|
||||||
KeystoreExportDialog keystoreExportDialog = new KeystoreExportDialog(keystore);
|
KeystoreExportDialog keystoreExportDialog = new KeystoreExportDialog(keystore);
|
||||||
|
keystoreExportDialog.initOwner(exportButton.getScene().getWindow());
|
||||||
keystoreExportDialog.showAndWait();
|
keystoreExportDialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,6 +416,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
|
|
||||||
if(copy.isEncrypted()) {
|
if(copy.isEncrypted()) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(copy.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(viewSeedButton.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(copy, password.get());
|
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(copy, password.get());
|
||||||
|
@ -437,9 +440,11 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
private void showPrivate(Keystore keystore) {
|
private void showPrivate(Keystore keystore) {
|
||||||
if(keystore.hasSeed()) {
|
if(keystore.hasSeed()) {
|
||||||
SeedDisplayDialog dlg = new SeedDisplayDialog(keystore);
|
SeedDisplayDialog dlg = new SeedDisplayDialog(keystore);
|
||||||
|
dlg.initOwner(viewSeedButton.getScene().getWindow());
|
||||||
dlg.showAndWait();
|
dlg.showAndWait();
|
||||||
} else if(keystore.hasMasterPrivateExtendedKey()) {
|
} else if(keystore.hasMasterPrivateExtendedKey()) {
|
||||||
MasterKeyDisplayDialog dlg = new MasterKeyDisplayDialog(keystore);
|
MasterKeyDisplayDialog dlg = new MasterKeyDisplayDialog(keystore);
|
||||||
|
dlg.initOwner(viewKeyButton.getScene().getWindow());
|
||||||
dlg.showAndWait();
|
dlg.showAndWait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -461,6 +466,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
}
|
}
|
||||||
|
|
||||||
CardPinDialog cardPinDialog = new CardPinDialog(backupOnly);
|
CardPinDialog cardPinDialog = new CardPinDialog(backupOnly);
|
||||||
|
cardPinDialog.initOwner(cardServiceButtons.getScene().getWindow());
|
||||||
Optional<CardPinDialog.CardPinChange> optPinChange = cardPinDialog.showAndWait();
|
Optional<CardPinDialog.CardPinChange> optPinChange = cardPinDialog.showAndWait();
|
||||||
if(optPinChange.isPresent()) {
|
if(optPinChange.isPresent()) {
|
||||||
String currentPin = optPinChange.get().currentPin();
|
String currentPin = optPinChange.get().currentPin();
|
||||||
|
@ -484,6 +490,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
AppServices.showErrorDialog("Error communicating with card", e.getMessage());
|
AppServices.showErrorDialog("Error communicating with card", e.getMessage());
|
||||||
});
|
});
|
||||||
ServiceProgressDialog serviceProgressDialog = new ServiceProgressDialog("Authentication Delay", "Waiting for authentication delay to clear...", "/image/tapsigner.png", authDelayService);
|
ServiceProgressDialog serviceProgressDialog = new ServiceProgressDialog("Authentication Delay", "Waiting for authentication delay to clear...", "/image/tapsigner.png", authDelayService);
|
||||||
|
serviceProgressDialog.initOwner(cardServiceButtons.getScene().getWindow());
|
||||||
AppServices.moveToActiveWindowScreen(serviceProgressDialog);
|
AppServices.moveToActiveWindowScreen(serviceProgressDialog);
|
||||||
authDelayService.start();
|
authDelayService.start();
|
||||||
} else {
|
} else {
|
||||||
|
@ -504,6 +511,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
String backup = backupService.getValue();
|
String backup = backupService.getValue();
|
||||||
String filename = fingerprint.getText() + ".aes";
|
String filename = fingerprint.getText() + ".aes";
|
||||||
TextAreaDialog backupDialog = new TextAreaDialog(backup, false, filename, Base64.getDecoder().decode(backup));
|
TextAreaDialog backupDialog = new TextAreaDialog(backup, false, filename, Base64.getDecoder().decode(backup));
|
||||||
|
backupDialog.initOwner(cardServiceButtons.getScene().getWindow());
|
||||||
backupDialog.setTitle("Backup Private Key");
|
backupDialog.setTitle("Backup Private Key");
|
||||||
backupDialog.getDialogPane().setHeaderText((requiresBackup && !backupOnly ? "Please backup first by saving" : "Save") + " the following text in a safe place. It contains an encrypted copy of the card's private key, and can be decrypted using the backup key written on the back of the card.");
|
backupDialog.getDialogPane().setHeaderText((requiresBackup && !backupOnly ? "Please backup first by saving" : "Save") + " the following text in a safe place. It contains an encrypted copy of the card's private key, and can be decrypted using the backup key written on the back of the card.");
|
||||||
backupDialog.showAndWait();
|
backupDialog.showAndWait();
|
||||||
|
@ -537,6 +545,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
|
|
||||||
public void scanXpubQR(ActionEvent event) {
|
public void scanXpubQR(ActionEvent event) {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(scanXpubQR.getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
@ -603,6 +612,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
||||||
|
|
||||||
public void displayXpubQR(ActionEvent event) {
|
public void displayXpubQR(ActionEvent event) {
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(xpub.getText());
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(xpub.getText());
|
||||||
|
qrDisplayDialog.initOwner(xpub.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,10 +168,12 @@ public class PaymentController extends WalletFormController implements Initializ
|
||||||
if(newValue == payNymWallet) {
|
if(newValue == payNymWallet) {
|
||||||
boolean selectLinkedOnly = sendController.getPaymentTabs().getTabs().size() > 1 || !SorobanServices.canWalletMix(sendController.getWalletForm().getWallet());
|
boolean selectLinkedOnly = sendController.getPaymentTabs().getTabs().size() > 1 || !SorobanServices.canWalletMix(sendController.getWalletForm().getWallet());
|
||||||
PayNymDialog payNymDialog = new PayNymDialog(sendController.getWalletForm().getWalletId(), PayNymDialog.Operation.SEND, selectLinkedOnly);
|
PayNymDialog payNymDialog = new PayNymDialog(sendController.getWalletForm().getWalletId(), PayNymDialog.Operation.SEND, selectLinkedOnly);
|
||||||
|
payNymDialog.initOwner(scanQrButton.getScene().getWindow());
|
||||||
Optional<PayNym> optPayNym = payNymDialog.showAndWait();
|
Optional<PayNym> optPayNym = payNymDialog.showAndWait();
|
||||||
optPayNym.ifPresent(this::setPayNym);
|
optPayNym.ifPresent(this::setPayNym);
|
||||||
} else if(newValue == nfcCardWallet) {
|
} else if(newValue == nfcCardWallet) {
|
||||||
DeviceGetAddressDialog deviceGetAddressDialog = new DeviceGetAddressDialog(Collections.emptyList());
|
DeviceGetAddressDialog deviceGetAddressDialog = new DeviceGetAddressDialog(Collections.emptyList());
|
||||||
|
deviceGetAddressDialog.initOwner(scanQrButton.getScene().getWindow());
|
||||||
Optional<Address> optAddress = deviceGetAddressDialog.showAndWait();
|
Optional<Address> optAddress = deviceGetAddressDialog.showAndWait();
|
||||||
if(optAddress.isPresent()) {
|
if(optAddress.isPresent()) {
|
||||||
address.setText(optAddress.get().toString());
|
address.setText(optAddress.get().toString());
|
||||||
|
@ -626,6 +628,7 @@ public class PaymentController extends WalletFormController implements Initializ
|
||||||
|
|
||||||
public void scanQrAddress(ActionEvent event) {
|
public void scanQrAddress(ActionEvent event) {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(scanQrButton.getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class ReceiveController extends WalletFormController implements Initializ
|
||||||
qrCode.setOnMouseClicked(event -> {
|
qrCode.setOnMouseClicked(event -> {
|
||||||
if(currentEntry != null) {
|
if(currentEntry != null) {
|
||||||
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(currentEntry.getAddress().toString());
|
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(currentEntry.getAddress().toString());
|
||||||
|
qrDisplayDialog.initOwner(address.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -220,6 +221,7 @@ public class ReceiveController extends WalletFormController implements Initializ
|
||||||
if(possibleDevices != null && !possibleDevices.isEmpty()) {
|
if(possibleDevices != null && !possibleDevices.isEmpty()) {
|
||||||
if(possibleDevices.size() > 1 || possibleDevices.get(0).isNeedsPinSent() || possibleDevices.get(0).isNeedsPassphraseSent()) {
|
if(possibleDevices.size() > 1 || possibleDevices.get(0).isNeedsPinSent() || possibleDevices.get(0).isNeedsPassphraseSent()) {
|
||||||
DeviceDisplayAddressDialog dlg = new DeviceDisplayAddressDialog(wallet, addressDescriptor);
|
DeviceDisplayAddressDialog dlg = new DeviceDisplayAddressDialog(wallet, addressDescriptor);
|
||||||
|
dlg.initOwner(displayAddress.getScene().getWindow());
|
||||||
dlg.showAndWait();
|
dlg.showAndWait();
|
||||||
} else {
|
} else {
|
||||||
Device actualDevice = possibleDevices.get(0);
|
Device actualDevice = possibleDevices.get(0);
|
||||||
|
@ -227,6 +229,7 @@ public class ReceiveController extends WalletFormController implements Initializ
|
||||||
displayAddressService.setOnFailed(failedEvent -> {
|
displayAddressService.setOnFailed(failedEvent -> {
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
DeviceDisplayAddressDialog dlg = new DeviceDisplayAddressDialog(wallet, addressDescriptor);
|
DeviceDisplayAddressDialog dlg = new DeviceDisplayAddressDialog(wallet, addressDescriptor);
|
||||||
|
dlg.initOwner(displayAddress.getScene().getWindow());
|
||||||
dlg.showAndWait();
|
dlg.showAndWait();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -234,6 +237,7 @@ public class ReceiveController extends WalletFormController implements Initializ
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DeviceDisplayAddressDialog dlg = new DeviceDisplayAddressDialog(wallet, addressDescriptor);
|
DeviceDisplayAddressDialog dlg = new DeviceDisplayAddressDialog(wallet, addressDescriptor);
|
||||||
|
dlg.initOwner(displayAddress.getScene().getWindow());
|
||||||
dlg.showAndWait();
|
dlg.showAndWait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1268,6 +1268,7 @@ public class SendController extends WalletFormController implements Initializabl
|
||||||
AppServices.showErrorDialog("Error broadcasting premix transaction", exception.getMessage());
|
AppServices.showErrorDialog("Error broadcasting premix transaction", exception.getMessage());
|
||||||
});
|
});
|
||||||
ServiceProgressDialog progressDialog = new ServiceProgressDialog("Whirlpool", "Broadcast Premix Transaction", "/image/whirlpool.png", tx0BroadcastService);
|
ServiceProgressDialog progressDialog = new ServiceProgressDialog("Whirlpool", "Broadcast Premix Transaction", "/image/whirlpool.png", tx0BroadcastService);
|
||||||
|
progressDialog.initOwner(premixButton.getScene().getWindow());
|
||||||
AppServices.moveToActiveWindowScreen(progressDialog);
|
AppServices.moveToActiveWindowScreen(progressDialog);
|
||||||
tx0BroadcastService.start();
|
tx0BroadcastService.start();
|
||||||
}
|
}
|
||||||
|
@ -1277,6 +1278,7 @@ public class SendController extends WalletFormController implements Initializabl
|
||||||
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
Storage storage = AppServices.get().getOpenWallets().get(wallet);
|
||||||
if(wallet.isEncrypted()) {
|
if(wallet.isEncrypted()) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(paymentTabs.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(wallet.copy(), password.get());
|
Storage.DecryptWalletService decryptWalletService = new Storage.DecryptWalletService(wallet.copy(), password.get());
|
||||||
|
@ -1373,6 +1375,7 @@ public class SendController extends WalletFormController implements Initializabl
|
||||||
AppServices.showErrorDialog("Error broadcasting notification transaction", failedEvent.getSource().getException().getMessage());
|
AppServices.showErrorDialog("Error broadcasting notification transaction", failedEvent.getSource().getException().getMessage());
|
||||||
});
|
});
|
||||||
ServiceProgressDialog progressDialog = new ServiceProgressDialog("Broadcast", "Broadcast Notification Transaction", "/image/paynym.png", proxyWorker);
|
ServiceProgressDialog progressDialog = new ServiceProgressDialog("Broadcast", "Broadcast Notification Transaction", "/image/paynym.png", proxyWorker);
|
||||||
|
progressDialog.initOwner(notificationButton.getScene().getWindow());
|
||||||
AppServices.moveToActiveWindowScreen(progressDialog);
|
AppServices.moveToActiveWindowScreen(progressDialog);
|
||||||
proxyWorker.setMessage("Broadcasting notification transaction...");
|
proxyWorker.setMessage("Broadcasting notification transaction...");
|
||||||
proxyWorker.start();
|
proxyWorker.start();
|
||||||
|
@ -1693,6 +1696,7 @@ public class SendController extends WalletFormController implements Initializabl
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
InitiatorDialog initiatorDialog = new InitiatorDialog(getWalletForm().getWalletId(), getWalletForm().getWallet(), walletTransactionProperty.get());
|
InitiatorDialog initiatorDialog = new InitiatorDialog(getWalletForm().getWalletId(), getWalletForm().getWallet(), walletTransactionProperty.get());
|
||||||
|
initiatorDialog.initOwner(paymentTabs.getScene().getWindow());
|
||||||
if(Config.get().isSameAppMixing()) {
|
if(Config.get().isSameAppMixing()) {
|
||||||
initiatorDialog.initModality(Modality.NONE);
|
initiatorDialog.initModality(Modality.NONE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,6 +257,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
String outputDescriptor = OutputDescriptor.getOutputDescriptor(wallet, KeyPurpose.DEFAULT_PURPOSES, null).toString(true);
|
String outputDescriptor = OutputDescriptor.getOutputDescriptor(wallet, KeyPurpose.DEFAULT_PURPOSES, null).toString(true);
|
||||||
CryptoOutput cryptoOutput = getCryptoOutput(wallet);
|
CryptoOutput cryptoOutput = getCryptoOutput(wallet);
|
||||||
MultisigBackupDialog dialog = new MultisigBackupDialog(wallet, outputDescriptor, cryptoOutput.toUR());
|
MultisigBackupDialog dialog = new MultisigBackupDialog(wallet, outputDescriptor, cryptoOutput.toUR());
|
||||||
|
dialog.initOwner(apply.getScene().getWindow());
|
||||||
dialog.showAndWait();
|
dialog.showAndWait();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -337,6 +338,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
|
|
||||||
public void scanDescriptorQR(ActionEvent event) {
|
public void scanDescriptorQR(ActionEvent event) {
|
||||||
QRScanDialog qrScanDialog = new QRScanDialog();
|
QRScanDialog qrScanDialog = new QRScanDialog();
|
||||||
|
qrScanDialog.initOwner(scanDescriptorQR.getScene().getWindow());
|
||||||
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
Optional<QRScanDialog.Result> optionalResult = qrScanDialog.showAndWait();
|
||||||
if(optionalResult.isPresent()) {
|
if(optionalResult.isPresent()) {
|
||||||
QRScanDialog.Result result = optionalResult.get();
|
QRScanDialog.Result result = optionalResult.get();
|
||||||
|
@ -374,6 +376,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
|
|
||||||
UR cryptoOutputUR = cryptoOutput.toUR();
|
UR cryptoOutputUR = cryptoOutput.toUR();
|
||||||
QRDisplayDialog qrDisplayDialog = new DescriptorQRDisplayDialog(walletForm.getWallet().getFullDisplayName(), outputDescriptor.toString(true), cryptoOutputUR);
|
QRDisplayDialog qrDisplayDialog = new DescriptorQRDisplayDialog(walletForm.getWallet().getFullDisplayName(), outputDescriptor.toString(true), cryptoOutputUR);
|
||||||
|
qrDisplayDialog.initOwner(showDescriptorQR.getScene().getWindow());
|
||||||
qrDisplayDialog.showAndWait();
|
qrDisplayDialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,6 +436,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
String outputDescriptorString = outputDescriptor.toString(walletForm.getWallet().isValid());
|
String outputDescriptorString = outputDescriptor.toString(walletForm.getWallet().isValid());
|
||||||
|
|
||||||
TextAreaDialog dialog = new TextAreaDialog(outputDescriptorString);
|
TextAreaDialog dialog = new TextAreaDialog(outputDescriptorString);
|
||||||
|
dialog.initOwner(editDescriptor.getScene().getWindow());
|
||||||
dialog.setTitle("Edit wallet output descriptor");
|
dialog.setTitle("Edit wallet output descriptor");
|
||||||
dialog.getDialogPane().setHeaderText("The wallet configuration is specified in the output descriptor.\nChanges to the output descriptor will modify the wallet configuration." +
|
dialog.getDialogPane().setHeaderText("The wallet configuration is specified in the output descriptor.\nChanges to the output descriptor will modify the wallet configuration." +
|
||||||
(walletForm.getWallet().getPolicyType() == PolicyType.MULTI ? "\nKey expressions are shown in canonical order." : ""));
|
(walletForm.getWallet().getPolicyType() == PolicyType.MULTI ? "\nKey expressions are shown in canonical order." : ""));
|
||||||
|
@ -477,6 +481,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
String outputDescriptorString = outputDescriptor.toString(walletForm.getWallet().isValid());
|
String outputDescriptorString = outputDescriptor.toString(walletForm.getWallet().isValid());
|
||||||
|
|
||||||
TextAreaDialog dialog = new TextAreaDialog(outputDescriptorString, false);
|
TextAreaDialog dialog = new TextAreaDialog(outputDescriptorString, false);
|
||||||
|
dialog.initOwner(showDescriptor.getScene().getWindow());
|
||||||
dialog.setTitle("Show wallet output descriptor");
|
dialog.setTitle("Show wallet output descriptor");
|
||||||
dialog.getDialogPane().setHeaderText("The wallet configuration is specified in the output descriptor.\nThis wallet is no longer editable - create a new wallet to change the descriptor." +
|
dialog.getDialogPane().setHeaderText("The wallet configuration is specified in the output descriptor.\nThis wallet is no longer editable - create a new wallet to change the descriptor." +
|
||||||
(walletForm.getWallet().getPolicyType() == PolicyType.MULTI ? "\nKey expressions are shown in canonical order." : ""));
|
(walletForm.getWallet().getPolicyType() == PolicyType.MULTI ? "\nKey expressions are shown in canonical order." : ""));
|
||||||
|
@ -485,6 +490,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
|
|
||||||
public void showAdvanced(ActionEvent event) {
|
public void showAdvanced(ActionEvent event) {
|
||||||
AdvancedDialog advancedDialog = new AdvancedDialog(walletForm);
|
AdvancedDialog advancedDialog = new AdvancedDialog(walletForm);
|
||||||
|
advancedDialog.initOwner(apply.getScene().getWindow());
|
||||||
Optional<Boolean> optApply = advancedDialog.showAndWait();
|
Optional<Boolean> optApply = advancedDialog.showAndWait();
|
||||||
if(optApply.isPresent() && optApply.get() && walletForm.getWallet().isValid()) {
|
if(optApply.isPresent() && optApply.get() && walletForm.getWallet().isValid()) {
|
||||||
revert.setDisable(true);
|
revert.setDisable(true);
|
||||||
|
@ -503,6 +509,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
&& entry.getKey().getName().equals(walletForm.getWallet().getName())).map(Map.Entry::getKey).findFirst();
|
&& entry.getKey().getName().equals(walletForm.getWallet().getName())).map(Map.Entry::getKey).findFirst();
|
||||||
if(optWallet.isPresent()) {
|
if(optWallet.isPresent()) {
|
||||||
WalletExportDialog dlg = new WalletExportDialog(optWallet.get());
|
WalletExportDialog dlg = new WalletExportDialog(optWallet.get());
|
||||||
|
dlg.initOwner(export.getScene().getWindow());
|
||||||
dlg.showAndWait();
|
dlg.showAndWait();
|
||||||
} else {
|
} else {
|
||||||
AppServices.showErrorDialog("Cannot export wallet", "Wallet cannot be exported, please save it first.");
|
AppServices.showErrorDialog("Cannot export wallet", "Wallet cannot be exported, please save it first.");
|
||||||
|
@ -514,6 +521,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
Wallet masterWallet = openWallet.isMasterWallet() ? openWallet : openWallet.getMasterWallet();
|
Wallet masterWallet = openWallet.isMasterWallet() ? openWallet : openWallet.getMasterWallet();
|
||||||
|
|
||||||
AddAccountDialog addAccountDialog = new AddAccountDialog(masterWallet);
|
AddAccountDialog addAccountDialog = new AddAccountDialog(masterWallet);
|
||||||
|
addAccountDialog.initOwner(addAccount.getScene().getWindow());
|
||||||
Optional<List<StandardAccount>> optAccounts = addAccountDialog.showAndWait();
|
Optional<List<StandardAccount>> optAccounts = addAccountDialog.showAndWait();
|
||||||
if(optAccounts.isPresent()) {
|
if(optAccounts.isPresent()) {
|
||||||
List<StandardAccount> standardAccounts = optAccounts.get();
|
List<StandardAccount> standardAccounts = optAccounts.get();
|
||||||
|
@ -530,6 +538,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
if(masterWallet.isEncrypted()) {
|
if(masterWallet.isEncrypted()) {
|
||||||
String walletId = walletForm.getWalletId();
|
String walletId = walletForm.getWalletId();
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(masterWallet.getName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(masterWallet.getName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(addAccount.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.KeyDerivationService keyDerivationService = new Storage.KeyDerivationService(walletForm.getStorage(), password.get(), true);
|
Storage.KeyDerivationService keyDerivationService = new Storage.KeyDerivationService(walletForm.getStorage(), password.get(), true);
|
||||||
|
@ -604,6 +613,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
if(discoverAccounts && masterWallet.getKeystores().size() == 1 && masterWallet.getKeystores().stream().allMatch(ks -> ks.getSource() == KeystoreSource.HW_USB)) {
|
if(discoverAccounts && masterWallet.getKeystores().size() == 1 && masterWallet.getKeystores().stream().allMatch(ks -> ks.getSource() == KeystoreSource.HW_USB)) {
|
||||||
String fingerprint = masterWallet.getKeystores().get(0).getKeyDerivation().getMasterFingerprint();
|
String fingerprint = masterWallet.getKeystores().get(0).getKeyDerivation().getMasterFingerprint();
|
||||||
DeviceKeystoreDiscoverDialog deviceKeystoreDiscoverDialog = new DeviceKeystoreDiscoverDialog(List.of(fingerprint), masterWallet, standardAccounts);
|
DeviceKeystoreDiscoverDialog deviceKeystoreDiscoverDialog = new DeviceKeystoreDiscoverDialog(List.of(fingerprint), masterWallet, standardAccounts);
|
||||||
|
deviceKeystoreDiscoverDialog.initOwner(addAccount.getScene().getWindow());
|
||||||
Optional<Map<StandardAccount, Keystore>> optDiscoveredKeystores = deviceKeystoreDiscoverDialog.showAndWait();
|
Optional<Map<StandardAccount, Keystore>> optDiscoveredKeystores = deviceKeystoreDiscoverDialog.showAndWait();
|
||||||
if(optDiscoveredKeystores.isPresent()) {
|
if(optDiscoveredKeystores.isPresent()) {
|
||||||
Map<StandardAccount, Keystore> discoveredKeystores = optDiscoveredKeystores.get();
|
Map<StandardAccount, Keystore> discoveredKeystores = optDiscoveredKeystores.get();
|
||||||
|
@ -815,6 +825,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
}
|
}
|
||||||
|
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(null, requirement, suggestChangePassword);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(null, requirement, suggestChangePassword);
|
||||||
|
dlg.initOwner(apply.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
if(dlg.isBackupExisting()) {
|
if(dlg.isBackupExisting()) {
|
||||||
|
|
|
@ -280,6 +280,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
||||||
public void mixSelected(ActionEvent event) {
|
public void mixSelected(ActionEvent event) {
|
||||||
List<UtxoEntry> selectedEntries = getSelectedUtxos();
|
List<UtxoEntry> selectedEntries = getSelectedUtxos();
|
||||||
WhirlpoolDialog whirlpoolDialog = new WhirlpoolDialog(getWalletForm().getMasterWalletId(), getWalletForm().getWallet(), selectedEntries);
|
WhirlpoolDialog whirlpoolDialog = new WhirlpoolDialog(getWalletForm().getMasterWalletId(), getWalletForm().getWallet(), selectedEntries);
|
||||||
|
whirlpoolDialog.initOwner(utxosTable.getScene().getWindow());
|
||||||
Optional<Tx0Preview> optTx0Preview = whirlpoolDialog.showAndWait();
|
Optional<Tx0Preview> optTx0Preview = whirlpoolDialog.showAndWait();
|
||||||
optTx0Preview.ifPresent(tx0Preview -> previewPremix(tx0Preview, selectedEntries));
|
optTx0Preview.ifPresent(tx0Preview -> previewPremix(tx0Preview, selectedEntries));
|
||||||
}
|
}
|
||||||
|
@ -290,6 +291,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
||||||
|
|
||||||
if(wallet.isMasterWallet() && !wallet.isWhirlpoolMasterWallet() && wallet.isEncrypted()) {
|
if(wallet.isMasterWallet() && !wallet.isWhirlpoolMasterWallet() && wallet.isEncrypted()) {
|
||||||
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
WalletPasswordDialog dlg = new WalletPasswordDialog(wallet.getMasterName(), WalletPasswordDialog.PasswordRequirement.LOAD);
|
||||||
|
dlg.initOwner(utxosTable.getScene().getWindow());
|
||||||
Optional<SecureString> password = dlg.showAndWait();
|
Optional<SecureString> password = dlg.showAndWait();
|
||||||
if(password.isPresent()) {
|
if(password.isPresent()) {
|
||||||
Storage.KeyDerivationService keyDerivationService = new Storage.KeyDerivationService(walletForm.getStorage(), password.get(), true);
|
Storage.KeyDerivationService keyDerivationService = new Storage.KeyDerivationService(walletForm.getStorage(), password.get(), true);
|
||||||
|
@ -428,6 +430,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
||||||
|
|
||||||
public void showMixToDialog(ActionEvent event) {
|
public void showMixToDialog(ActionEvent event) {
|
||||||
MixToDialog mixToDialog = new MixToDialog(getWalletForm().getWallet());
|
MixToDialog mixToDialog = new MixToDialog(getWalletForm().getWallet());
|
||||||
|
mixToDialog.initOwner(mixTo.getScene().getWindow());
|
||||||
Optional<MixConfig> optMixConfig = mixToDialog.showAndWait();
|
Optional<MixConfig> optMixConfig = mixToDialog.showAndWait();
|
||||||
if(optMixConfig.isPresent()) {
|
if(optMixConfig.isPresent()) {
|
||||||
MixConfig changedMixConfig = optMixConfig.get();
|
MixConfig changedMixConfig = optMixConfig.get();
|
||||||
|
|
Loading…
Reference in a new issue