diff --git a/src/main/java/com/sparrowwallet/sparrow/io/SpecterDesktop.java b/src/main/java/com/sparrowwallet/sparrow/io/SpecterDesktop.java index 43bcfde6..44b83cc3 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/SpecterDesktop.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/SpecterDesktop.java @@ -22,7 +22,7 @@ public class SpecterDesktop implements WalletImport, WalletExport { try { SpecterWallet specterWallet = new SpecterWallet(); specterWallet.label = wallet.getFullName(); - specterWallet.blockheight = wallet.getTransactions().values().stream().mapToInt(BlockTransactionHash::getHeight).min().orElse(wallet.getStoredBlockHeight()); + specterWallet.blockheight = wallet.getTransactions().values().stream().mapToInt(BlockTransactionHash::getHeight).min().orElse(wallet.getStoredBlockHeight() == null ? 0 : wallet.getStoredBlockHeight()); specterWallet.descriptor = OutputDescriptor.getOutputDescriptor(wallet).toString(true); Gson gson = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();