mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-11-05 11:56:37 +00:00
[feature/1630] Added owner to qrDisplayDialog
This commit is contained in:
parent
111e4ccf37
commit
c758a4c42e
2 changed files with 3 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in a new issue