[feature/1630] Added owner to qrDisplayDialog

This commit is contained in:
Thauan Amorim 2025-02-12 10:43:52 -03:00
parent 111e4ccf37
commit c758a4c42e
2 changed files with 3 additions and 5 deletions

View file

@ -191,10 +191,6 @@ public class QRDisplayDialog extends Dialog<ButtonType> {
setResultConverter(dialogButton -> dialogButton);
}
public static QRDisplayDialog of(UR ur, BBQR bbqr, boolean addLegacyEncodingOption, boolean addScanButton, boolean selectBbqrButton) {
return new QRDisplayDialog(ur, bbqr, addLegacyEncodingOption, addScanButton, selectBbqrButton);
}
private int getQRSize() {
return AppServices.isReducedWindowHeight() ? REDUCED_QR_SIZE : DEFAULT_QR_SIZE;
}

View file

@ -1267,7 +1267,9 @@ public class HeadersController extends TransactionFormController implements Init
byte[] txBytes = transaction.bitcoinSerialize();
UR ur = UR.fromBytes(txBytes);
BBQR bbqr = new BBQR(BBQRType.TXN, txBytes);
QRDisplayDialog.of(ur, bbqr, false, false, false).showAndWait();
QRDisplayDialog qrDisplayDialog = new QRDisplayDialog(ur, bbqr, false, false, false);
qrDisplayDialog.initOwner(showTransactionButton.getScene().getWindow());
qrDisplayDialog.showAndWait();
} catch (Exception exception) {
log.error("Error creating UR", exception);
AppServices.showErrorDialog("Error displaying transaction QR code", exception.getMessage());