mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-23 20:36:44 +00:00
no fingerprint labels and tests
This commit is contained in:
parent
68aeb5946a
commit
1ed59bb935
6 changed files with 11 additions and 9 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit 8ffd22500754b77e420e2a3f887864e89a47e906
|
||||
Subproject commit aa60e6b92e0401a27c3760cc9cb7e726a2caa845
|
|
@ -19,15 +19,15 @@ public class KeystorePassphraseDialog extends Dialog<String> {
|
|||
|
||||
final DialogPane dialogPane = getDialogPane();
|
||||
setTitle("Keystore Passphrase");
|
||||
dialogPane.setHeaderText("Please enter the passphrase for keystore: " + keystore.getLabel());
|
||||
dialogPane.setHeaderText("Please enter the passphrase for keystore: \n" + keystore.getLabel());
|
||||
dialogPane.getStylesheets().add(AppController.class.getResource("general.css").toExternalForm());
|
||||
dialogPane.getButtonTypes().addAll(ButtonType.CANCEL, ButtonType.OK);
|
||||
dialogPane.setPrefWidth(380);
|
||||
dialogPane.setPrefHeight(200);
|
||||
|
||||
Glyph lock = new Glyph("FontAwesome5", FontAwesome5.Glyph.KEY);
|
||||
lock.setFontSize(50);
|
||||
dialogPane.setGraphic(lock);
|
||||
Glyph key = new Glyph(FontAwesome5.FONT_NAME, FontAwesome5.Glyph.KEY);
|
||||
key.setFontSize(50);
|
||||
dialogPane.setGraphic(key);
|
||||
|
||||
final VBox content = new VBox(10);
|
||||
content.setPrefHeight(50);
|
||||
|
|
|
@ -36,7 +36,7 @@ public class ColdcardMultisig implements WalletImport, KeystoreFileImport, Walle
|
|||
InputStreamReader reader = new InputStreamReader(inputStream);
|
||||
ColdcardKeystore cck = Storage.getGson().fromJson(reader, ColdcardKeystore.class);
|
||||
|
||||
Keystore keystore = new Keystore("Coldcard " + cck.xfp);
|
||||
Keystore keystore = new Keystore("Coldcard");
|
||||
keystore.setSource(KeystoreSource.HW_AIRGAPPED);
|
||||
keystore.setWalletModel(WalletModel.COLDCARD);
|
||||
|
||||
|
@ -109,11 +109,12 @@ public class ColdcardMultisig implements WalletImport, KeystoreFileImport, Walle
|
|||
break;
|
||||
default:
|
||||
if (key.length() == 8 && Utils.isHex(key)) {
|
||||
Keystore keystore = new Keystore("Coldcard " + key);
|
||||
Keystore keystore = new Keystore("Coldcard");
|
||||
keystore.setSource(KeystoreSource.HW_AIRGAPPED);
|
||||
keystore.setWalletModel(WalletModel.COLDCARD);
|
||||
keystore.setKeyDerivation(new KeyDerivation(key, derivation));
|
||||
keystore.setExtendedPublicKey(ExtendedKey.fromDescriptor(value));
|
||||
wallet.makeLabelsUnique(keystore);
|
||||
wallet.getKeystores().add(keystore);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class ColdcardSinglesig implements KeystoreFileImport {
|
|||
ScriptType ckScriptType = ScriptType.valueOf(ck.name.replace("p2wpkh-p2sh", "p2sh_p2wpkh").toUpperCase());
|
||||
if(ckScriptType.equals(scriptType)) {
|
||||
Keystore keystore = new Keystore();
|
||||
keystore.setLabel("Coldcard " + masterFingerprint.toUpperCase());
|
||||
keystore.setLabel("Coldcard");
|
||||
keystore.setSource(KeystoreSource.HW_AIRGAPPED);
|
||||
keystore.setWalletModel(WalletModel.COLDCARD);
|
||||
keystore.setKeyDerivation(new KeyDerivation(masterFingerprint, ck.deriv));
|
||||
|
|
|
@ -131,7 +131,7 @@ public class Electrum implements KeystoreFileImport, WalletImport, WalletExport
|
|||
|
||||
keystore.setKeyDerivation(new KeyDerivation(masterFingerprint, derivationPath));
|
||||
keystore.setExtendedPublicKey(xPub);
|
||||
keystore.setLabel(ek.label != null ? ek.label : "Electrum " + masterFingerprint);
|
||||
keystore.setLabel(ek.label != null ? ek.label : "Electrum");
|
||||
wallet.getKeystores().add(keystore);
|
||||
|
||||
ExtendedKey.Header xpubHeader = ExtendedKey.Header.fromExtendedKey(ek.xpub);
|
||||
|
|
|
@ -182,6 +182,7 @@ public class KeystoreController extends WalletFormController implements Initiali
|
|||
selectSourcePane.setVisible(false);
|
||||
|
||||
Keystore importedKeystore = result.get();
|
||||
walletForm.getWallet().makeLabelsUnique(importedKeystore);
|
||||
keystore.setSource(importedKeystore.getSource());
|
||||
keystore.setWalletModel(importedKeystore.getWalletModel());
|
||||
keystore.setLabel(importedKeystore.getLabel());
|
||||
|
|
Loading…
Reference in a new issue