What changed, and why it matters
This commit is purely a code-style cleanup. It removes an extra blank line and adjusts spacing around a comment so the code matches the project's formatting rules (the 'black' formatter). No behavior of the wallet software changes, and there is no security fix or vulnerability introduced.
No security action needed. Treat as a normal style/refactor commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff only applies formatting changes produced by the Black code formatter. In src/krux/wallet.py it removes a blank line after an import and reformats an if-condition to remove redundant parentheses. In tests/test_wallet.py it adds a second space before an inline comment. The logic, control flow, and data handling are identical before and after the commit.
Changed components
src/krux/wallet.pytests/test_wallet.pyInspect captured patch +3 / −2
diff --git a/src/krux/wallet.py b/src/krux/wallet.py
index 5533cb3..cbc3fb3 100644
--- a/src/krux/wallet.py
+++ b/src/krux/wallet.py
@@ -266,9 +266,10 @@ class Wallet:
if self.descriptor.taptree:
if not descriptor.keys[0].origin:
from embit.ec import NUMS_PUBKEY
+
# Check if BIP-0341 NUMS was used
# Compare expected provably unspendable key with first descriptor key
- if (descriptor.keys[0].key.get_public_key() != NUMS_PUBKEY):
+ if descriptor.keys[0].key.get_public_key() != NUMS_PUBKEY:
self.wallet_data = None
raise ValueError("Internal key not provably unspendable")
taproot_txt = "TR "
diff --git a/tests/test_wallet.py b/tests/test_wallet.py
index 8737b18..f113d0c 100644
--- a/tests/test_wallet.py
+++ b/tests/test_wallet.py
@@ -1664,7 +1664,7 @@ def test_provably_unspendable_non_deterministic_chain_code(mocker, m5stickv, tda
wallet = Wallet(tdata.TAP_MINISCRIPT_KEY)
wallet.load(NON_DETERMINISTIC_CHAIN_CODE, FORMAT_NONE)
- assert wallet.is_loaded() #ignored the chaincode
+ assert wallet.is_loaded() # ignored the chaincode
def test_parse_wallet_raises_errors(mocker, m5stickv, tdata):
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.