proto.clearPaymentUrl();
else
proto.setPaymentUrl(LHUtils.makeServerPath(name, LHUtils.titleToUrlString(title.get())));
});
Address addr = project.getOutputs().get(0).getAddressFromP2PKHScript(project.getParams());
if (addr == null)
throw new IllegalArgumentException("Output type is not a pay to address: " + project.getOutputs().get(0));
address.set(addr.toString());
address.addListener(o -> {
try {
Address addr2 = new Address(project.getParams(), address.get());
proto.getOutputsBuilder(0).setScript(ByteString.copyFrom(ScriptBuilder.createOutputScript(addr2).getProgram()));
} catch (AddressFormatException e) {
// Ignored: wait for the user to make it valid.
}
});