Skip to content

Commit

Permalink
export electrum wallets with only usb capable hardware wallets as har…
Browse files Browse the repository at this point in the history
…dware keystore types
  • Loading branch information
craigraw committed May 10, 2024
1 parent 87cc28e commit b59a65d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drongo
8 changes: 6 additions & 2 deletions src/main/java/com/sparrowwallet/sparrow/io/Electrum.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,12 @@ public void exportWallet(Wallet wallet, OutputStream outputStream, String passwo
ek.derivation = keystore.getKeyDerivation().getDerivationPath();
ek.root_fingerprint = keystore.getKeyDerivation().getMasterFingerprint();
ek.xpub = keystore.getExtendedPublicKey().toString(xpubHeader);
ek.type = "hardware";
ek.hw_type = keystore.getWalletModel().getType();
if(keystore.getWalletModel().hasUsb()) {
ek.type = "hardware";
ek.hw_type = keystore.getWalletModel().getType();
} else {
ek.type = "bip32";
}
ew.use_encryption = false;
} else if(keystore.getSource() == KeystoreSource.SW_SEED) {
ek.type = "bip32";
Expand Down

0 comments on commit b59a65d

Please sign in to comment.