fix URI generation (#716)

This commit is contained in:
m2049r 2021-02-19 16:32:15 +01:00 committed by GitHub
parent a19ad7fd52
commit dda86bd5de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -84,7 +84,9 @@ public class BarcodeData {
public String getUriString() {
if (asset != Crypto.XMR) throw new IllegalStateException("We can only do XMR stuff!");
StringBuilder sb = new StringBuilder();
sb.append(Crypto.XMR.getUriScheme()).append(address);
sb.append(Crypto.XMR.getUriScheme())
.append(':')
.append(address);
boolean first = true;
if ((description != null) && !description.isEmpty()) {
sb.append(first ? "?" : "&");