Browse Source

add passport multisig wallet export

terminal
Craig Raw 4 years ago
parent
commit
c3ae98f3d1
  1. 3
      src/main/java/com/sparrowwallet/sparrow/control/FileWalletExportPane.java
  2. 2
      src/main/java/com/sparrowwallet/sparrow/control/WalletExportDialog.java
  3. 10
      src/main/java/com/sparrowwallet/sparrow/io/PassportMultisig.java

3
src/main/java/com/sparrowwallet/sparrow/control/FileWalletExportPane.java

@ -10,6 +10,7 @@ import com.sparrowwallet.sparrow.event.TimedEvent;
import com.sparrowwallet.sparrow.event.WalletExportEvent;
import com.sparrowwallet.sparrow.glyphfont.FontAwesome5;
import com.sparrowwallet.sparrow.io.CoboVaultMultisig;
import com.sparrowwallet.sparrow.io.PassportMultisig;
import com.sparrowwallet.sparrow.io.Storage;
import com.sparrowwallet.sparrow.io.WalletExport;
import javafx.geometry.Pos;
@ -134,6 +135,8 @@ public class FileWalletExportPane extends TitledDescriptionPane {
QRDisplayDialog qrDisplayDialog;
if(exporter instanceof CoboVaultMultisig) {
qrDisplayDialog = new QRDisplayDialog(RegistryType.BYTES.toString(), outputStream.toByteArray(), true);
} else if(exporter instanceof PassportMultisig) {
qrDisplayDialog = new QRDisplayDialog(RegistryType.BYTES.toString(), outputStream.toByteArray(), false);
} else {
qrDisplayDialog = new QRDisplayDialog(outputStream.toString(StandardCharsets.UTF_8));
}

2
src/main/java/com/sparrowwallet/sparrow/control/WalletExportDialog.java

@ -43,7 +43,7 @@ public class WalletExportDialog extends Dialog<Wallet> {
if(wallet.getPolicyType() == PolicyType.SINGLE) {
exporters = List.of(new Electrum(), new SpecterDesktop(), new Sparrow());
} else if(wallet.getPolicyType() == PolicyType.MULTI) {
exporters = List.of(new ColdcardMultisig(), new CoboVaultMultisig(), new Electrum(), new SpecterDesktop(), new BlueWalletMultisig(), new Sparrow());
exporters = List.of(new ColdcardMultisig(), new CoboVaultMultisig(), new Electrum(), new PassportMultisig(), new SpecterDesktop(), new BlueWalletMultisig(), new Sparrow());
} else {
throw new UnsupportedOperationException("Cannot export wallet with policy type " + wallet.getPolicyType());
}

10
src/main/java/com/sparrowwallet/sparrow/io/PassportMultisig.java

@ -35,4 +35,14 @@ public class PassportMultisig extends ColdcardMultisig {
public boolean isKeystoreImportScannable() {
return true;
}
@Override
public String getWalletExportDescription() {
return "Export file that can be read by your Passport using the Settings > Multisig Wallets > Import feature.";
}
@Override
public boolean isWalletExportScannable() {
return true;
}
}

Loading…
Cancel
Save