From 60d04b4f54893c1078e76cfe77e91c1e3f40109e Mon Sep 17 00:00:00 2001 From: "codeflash-ai[bot]" <148906541+codeflash-ai[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:18:18 +0000 Subject: [PATCH] Optimize xfp2str MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The optimization removes a redundant `.lower()` method call from the string formatting chain. In Python's `bytes.hex()` method, the hexadecimal output is already lowercase by default, making the explicit `.lower()` call unnecessary. **Key Change:** - Removed `.lower()` from `struct.pack(' int: def xfp2str(xfp: int) -> str: # Standardized way to show an xpub's fingerprint... it's a 4-byte string # and not really an integer. Used to show as '0x%08x' but that's wrong endian. - return struct.pack('