mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-08-03 05:02:13 +02:00
minor hwi and mempool fetching tweaks
This commit is contained in:
@@ -129,7 +129,6 @@ public class DevicePane extends TitledDescriptionPane {
|
||||
|
||||
private void createImportButton() {
|
||||
importButton = new SplitMenuButton();
|
||||
importButton.getStyleClass().add("default-button");
|
||||
importButton.setAlignment(Pos.CENTER_RIGHT);
|
||||
importButton.setText("Import Keystore");
|
||||
importButton.setOnAction(event -> {
|
||||
@@ -279,6 +278,8 @@ public class DevicePane extends TitledDescriptionPane {
|
||||
setError(sendPinService.getException().getMessage(), null);
|
||||
enterPinButton.setDisable(false);
|
||||
});
|
||||
setDescription("Unlocking...");
|
||||
showHideLink.setVisible(false);
|
||||
sendPinService.start();
|
||||
}
|
||||
|
||||
@@ -354,6 +355,8 @@ public class DevicePane extends TitledDescriptionPane {
|
||||
setError(getXpubService.getException().getMessage(), null);
|
||||
importButton.setDisable(false);
|
||||
});
|
||||
setDescription("Importing...");
|
||||
showHideLink.setVisible(false);
|
||||
getXpubService.start();
|
||||
}
|
||||
|
||||
@@ -367,6 +370,8 @@ public class DevicePane extends TitledDescriptionPane {
|
||||
setError(signPSBTService.getException().getMessage(), null);
|
||||
signButton.setDisable(false);
|
||||
});
|
||||
setDescription("Signing...");
|
||||
showHideLink.setVisible(false);
|
||||
signPSBTService.start();
|
||||
}
|
||||
|
||||
|
@@ -313,6 +313,10 @@ public class ElectrumServer {
|
||||
}
|
||||
}
|
||||
|
||||
if(blockHeights.isEmpty()) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
||||
JsonRpcClient client = new JsonRpcClient(getTransport());
|
||||
BatchRequestBuilder<Integer, String> batchRequest = client.createBatchRequest().keysType(Integer.class).returnType(String.class);
|
||||
for(Integer height : blockHeights) {
|
||||
|
@@ -103,8 +103,10 @@ public class Hwi {
|
||||
JsonElement error = result.get("error");
|
||||
if(error != null && error.getAsString().equals("sign_tx canceled")) {
|
||||
throw new SignTransactionException("Signing cancelled");
|
||||
} else if(error != null && error.getAsString().equals("open failed")) {
|
||||
throw new SignTransactionException("Please reconnect your USB device");
|
||||
} else if(error != null) {
|
||||
throw new SignTransactionException("Error: " + error.getAsString());
|
||||
throw new SignTransactionException(error.getAsString());
|
||||
} else {
|
||||
throw new SignTransactionException("Could not retrieve PSBT");
|
||||
}
|
||||
|
Reference in New Issue
Block a user