From 4b373714a9a39a775a75247783e4e0525515c00c Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 20 Aug 2026 13:37:20 +0200 Subject: [PATCH] release the reference to the derived encryption key when clearing a loaded wallet --- src/main/java/com/sparrowwallet/sparrow/io/WalletAndKey.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/io/WalletAndKey.java b/src/main/java/com/sparrowwallet/sparrow/io/WalletAndKey.java index 6768eaa4..e042f585 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/WalletAndKey.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/WalletAndKey.java @@ -7,7 +7,7 @@ import java.util.Map; public class WalletAndKey implements Comparable { private final Wallet wallet; - private final ECKey encryptionKey; + private ECKey encryptionKey; private final Key key; private final Map childWallets; @@ -38,6 +38,7 @@ public class WalletAndKey implements Comparable { if(key != null) { key.clear(); } + encryptionKey = null; } @Override