Update SeedWordsView.java

Using cakewallet's QR Code format 
```String formattedSeed = "monero-wallet:?seed=" + seedWords.replace(" ", "+");```
This commit is contained in:
XMRZombie 2024-12-15 12:44:43 +00:00 committed by GitHub
parent 5b754bff9d
commit 197997ba7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -263,9 +263,12 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
private void generateAndDisplayQRCode(String seedWords) { private void generateAndDisplayQRCode(String seedWords) {
Platform.runLater(() -> { Platform.runLater(() -> {
// Using cakewallet's QR Code format
String formattedSeed = "monero-wallet:?seed=" + seedWords.replace(" ", "+");
// Generate QR Code using the net.glxn.qrgen library // Generate QR Code using the net.glxn.qrgen library
ByteArrayInputStream qrCodeStream = new ByteArrayInputStream( ByteArrayInputStream qrCodeStream = new ByteArrayInputStream(
QRCode.from(seedWords).to(ImageType.PNG).stream().toByteArray() QRCode.from(formattedSeed).to(ImageType.PNG).stream().toByteArray()
); );
Image qrCodeImage = new Image(qrCodeStream); Image qrCodeImage = new Image(qrCodeStream);
qrCodeImageView.setImage(qrCodeImage); qrCodeImageView.setImage(qrCodeImage);