mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
minor hwi and mempool fetching tweaks
This commit is contained in:
parent
1c03e1935e
commit
7428d21cac
3 changed files with 13 additions and 2 deletions
|
@ -129,7 +129,6 @@ public class DevicePane extends TitledDescriptionPane {
|
||||||
|
|
||||||
private void createImportButton() {
|
private void createImportButton() {
|
||||||
importButton = new SplitMenuButton();
|
importButton = new SplitMenuButton();
|
||||||
importButton.getStyleClass().add("default-button");
|
|
||||||
importButton.setAlignment(Pos.CENTER_RIGHT);
|
importButton.setAlignment(Pos.CENTER_RIGHT);
|
||||||
importButton.setText("Import Keystore");
|
importButton.setText("Import Keystore");
|
||||||
importButton.setOnAction(event -> {
|
importButton.setOnAction(event -> {
|
||||||
|
@ -279,6 +278,8 @@ public class DevicePane extends TitledDescriptionPane {
|
||||||
setError(sendPinService.getException().getMessage(), null);
|
setError(sendPinService.getException().getMessage(), null);
|
||||||
enterPinButton.setDisable(false);
|
enterPinButton.setDisable(false);
|
||||||
});
|
});
|
||||||
|
setDescription("Unlocking...");
|
||||||
|
showHideLink.setVisible(false);
|
||||||
sendPinService.start();
|
sendPinService.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,6 +355,8 @@ public class DevicePane extends TitledDescriptionPane {
|
||||||
setError(getXpubService.getException().getMessage(), null);
|
setError(getXpubService.getException().getMessage(), null);
|
||||||
importButton.setDisable(false);
|
importButton.setDisable(false);
|
||||||
});
|
});
|
||||||
|
setDescription("Importing...");
|
||||||
|
showHideLink.setVisible(false);
|
||||||
getXpubService.start();
|
getXpubService.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,6 +370,8 @@ public class DevicePane extends TitledDescriptionPane {
|
||||||
setError(signPSBTService.getException().getMessage(), null);
|
setError(signPSBTService.getException().getMessage(), null);
|
||||||
signButton.setDisable(false);
|
signButton.setDisable(false);
|
||||||
});
|
});
|
||||||
|
setDescription("Signing...");
|
||||||
|
showHideLink.setVisible(false);
|
||||||
signPSBTService.start();
|
signPSBTService.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -313,6 +313,10 @@ public class ElectrumServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(blockHeights.isEmpty()) {
|
||||||
|
return Collections.emptyMap();
|
||||||
|
}
|
||||||
|
|
||||||
JsonRpcClient client = new JsonRpcClient(getTransport());
|
JsonRpcClient client = new JsonRpcClient(getTransport());
|
||||||
BatchRequestBuilder<Integer, String> batchRequest = client.createBatchRequest().keysType(Integer.class).returnType(String.class);
|
BatchRequestBuilder<Integer, String> batchRequest = client.createBatchRequest().keysType(Integer.class).returnType(String.class);
|
||||||
for(Integer height : blockHeights) {
|
for(Integer height : blockHeights) {
|
||||||
|
|
|
@ -103,8 +103,10 @@ public class Hwi {
|
||||||
JsonElement error = result.get("error");
|
JsonElement error = result.get("error");
|
||||||
if(error != null && error.getAsString().equals("sign_tx canceled")) {
|
if(error != null && error.getAsString().equals("sign_tx canceled")) {
|
||||||
throw new SignTransactionException("Signing cancelled");
|
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) {
|
} else if(error != null) {
|
||||||
throw new SignTransactionException("Error: " + error.getAsString());
|
throw new SignTransactionException(error.getAsString());
|
||||||
} else {
|
} else {
|
||||||
throw new SignTransactionException("Could not retrieve PSBT");
|
throw new SignTransactionException("Could not retrieve PSBT");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue