test_storage_upgrade: add test wallet with invoice and request
What changed, and why it matters
This commit only adds a new test case and a test wallet file to Electrum's test suite. It does not change any production code, so it cannot introduce a security vulnerability or fix one. The test wallet contains a publicly exposed seed phrase, but it appears to be a deliberately created test wallet with no real funds, used to verify that old wallet files upgrade correctly.
No action required. If the exposed seed were ever used for real funds, rotate it; otherwise this is a normal test fixture.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds one test method (test_upgrade_from_client_4_0_1_with_invoices) and a fixture wallet file (client_4_0_1_with_invoices) to tests/test_storage_upgrade.py. The wallet has seed_version 31, one invoice, one payment request, and a cleartext BIP39 seed plus xprv. This is test-only data; no application logic is modified. The exposed seed is consistent with other test fixtures in the repository and is not a vulnerability in the commit itself.
Changed components
tests/test_storage_upgrade.pytests/test_storage_upgrade/client_4_0_1_with_invoicesInspect captured patch +147 / −0
diff --git a/tests/test_storage_upgrade.py b/tests/test_storage_upgrade.py
index 4be5cbe..c20407e 100644
--- a/tests/test_storage_upgrade.py
+++ b/tests/test_storage_upgrade.py
@@ -312,6 +312,11 @@ class TestStorageUpgrade(WalletTestCase):
wallet_str = self._get_wallet_str()
await self._upgrade_storage(wallet_str)
+ async def test_upgrade_from_client_4_0_1_with_invoices(self):
+ # wallet with one invoice and one request. seed_version is 31
+ wallet_str = self._get_wallet_str()
+ await self._upgrade_storage(wallet_str)
+
@as_testnet
async def test_upgrade_from_client_4_5_2_9dk_with_ln(self):
# This is a realistic testnet wallet, from the "9dk" seed, including some lightning sends/receives,
diff --git a/tests/test_storage_upgrade/client_4_0_1_with_invoices b/tests/test_storage_upgrade/client_4_0_1_with_invoices
new file mode 100644
index 0000000..1a4b643
--- /dev/null
+++ b/tests/test_storage_upgrade/client_4_0_1_with_invoices
@@ -0,0 +1,142 @@
+{
+ "addr_history": {
+ "bc1q0pq9lzpmzhndwuq4uv2h0satjddsr8z875klkz": [],
+ "bc1q37qmppzlg6ycd65ap6px3ss7e97hnmapdfserw": [],
+ "bc1q3fn3khmpd5h0p94x4nfez6rgaxe4yr2vmhalr5": [],
+ "bc1q54eg44ddrxht5sujus9k46pn8vxv3tvxcyntg3": [],
+ "bc1q5uwrpayl32sfg7uhg7d6xk7hkxfj6clmazf0gx": [],
+ "bc1q7k8j7vluzf3j2870npqr0jexgrvt9pkh09msgr": [],
+ "bc1q7vl3xecflfg8s8crusfx4d4jq75znj3m3cfd5c": [],
+ "bc1q888m7r4m9e58fdhcxzxmqrstcensdgpggy4n4y": [],
+ "bc1q8jqhh8w7z2gl70637uvsydhknys7x3tn82j6wr": [],
+ "bc1q8lj7tfggdka286xw5vw0njjxlk02m8zs6erlsj": [],
+ "bc1q8qwgdkxr5menygnmv8zvvqtywxh8x8nynghnuv": [],
+ "bc1qaaf9ax9q8kmghx0q0zx9zmhmnehnq4xvfnxdrx": [],
+ "bc1qafmcmt0aph84zr8cvs2x50l9gcmzl38kjfxuf7": [],
+ "bc1qc9snwyszrsyyg48pfy0vs89mfw5mdj5ejh59hf": [],
+ "bc1qe30q0ctrapjeyls5043vhydhg4fmfj7mfqmpyq": [],
+ "bc1qfsfr8wfzqsyd4hnwfy7gzqdyu2nxt6qaje6e25": [],
+ "bc1qgjjh8gnxj3j5zuk7je5ju0ld74p3d52cvxuptm": [],
+ "bc1qhfz2y4035w0me73zuxwrulffjcfqrs0qjfhx7h": [],
+ "bc1qm4l07z0p3nt0c9eqxp79krnru8lun7xd7azef2": [],
+ "bc1qmjuz63swd5y8knkfgt248v4fryuhvlutajey94": [],
+ "bc1qqg34zhhshx7spuwaln3ufcfz422rstsk5yhvnt": [],
+ "bc1qqmedq62tvgpm4lel69959qv845v5y77pqd5wmh": [],
+ "bc1qshe6rkq3kt8n02hsdq93nt5d7vuynhpauluvyt": [],
+ "bc1qttpzzuz2xqf72gamkq5yd4uu9m8phu393pgtg7": [],
+ "bc1quqj4a6n0qc7r998asxdeyrryqrter5kpn48w7g": [],
+ "bc1qvuhuu8xf826huktjzeukmh5f5eg7eyl8ymc3p4": [],
+ "bc1qvut6xjdhlmtrfk5mx683w809gnr7cwl0c0v4pn": [],
+ "bc1qwz82cujc9q5y035hs87waeswydjqs3w35jyxzq": [],
+ "bc1qyjm0020ym83pmw3nh4w9h3y7zqmcxfatxwdjdt": [],
+ "bc1qzwgjzzvtl7q9pfatjfr3d9xq439qn08ckjkmhg": []
+ },
+ "addresses": {
+ "change": [
+ "bc1q54eg44ddrxht5sujus9k46pn8vxv3tvxcyntg3",
+ "bc1qshe6rkq3kt8n02hsdq93nt5d7vuynhpauluvyt",
+ "bc1q8qwgdkxr5menygnmv8zvvqtywxh8x8nynghnuv",
+ "bc1quqj4a6n0qc7r998asxdeyrryqrter5kpn48w7g",
+ "bc1qe30q0ctrapjeyls5043vhydhg4fmfj7mfqmpyq",
+ "bc1q3fn3khmpd5h0p94x4nfez6rgaxe4yr2vmhalr5",
+ "bc1q5uwrpayl32sfg7uhg7d6xk7hkxfj6clmazf0gx",
+ "bc1qm4l07z0p3nt0c9eqxp79krnru8lun7xd7azef2",
+ "bc1q8jqhh8w7z2gl70637uvsydhknys7x3tn82j6wr",
+ "bc1qzwgjzzvtl7q9pfatjfr3d9xq439qn08ckjkmhg"
+ ],
+ "receiving": [
+ "bc1qqg34zhhshx7spuwaln3ufcfz422rstsk5yhvnt",
+ "bc1qvuhuu8xf826huktjzeukmh5f5eg7eyl8ymc3p4",
+ "bc1qgjjh8gnxj3j5zuk7je5ju0ld74p3d52cvxuptm",
+ "bc1qyjm0020ym83pmw3nh4w9h3y7zqmcxfatxwdjdt",
+ "bc1qqmedq62tvgpm4lel69959qv845v5y77pqd5wmh",
+ "bc1q7k8j7vluzf3j2870npqr0jexgrvt9pkh09msgr",
+ "bc1qfsfr8wfzqsyd4hnwfy7gzqdyu2nxt6qaje6e25",
+ "bc1q8lj7tfggdka286xw5vw0njjxlk02m8zs6erlsj",
+ "bc1q888m7r4m9e58fdhcxzxmqrstcensdgpggy4n4y",
+ "bc1q7vl3xecflfg8s8crusfx4d4jq75znj3m3cfd5c",
+ "bc1qhfz2y4035w0me73zuxwrulffjcfqrs0qjfhx7h",
+ "bc1qvut6xjdhlmtrfk5mx683w809gnr7cwl0c0v4pn",
+ "bc1qaaf9ax9q8kmghx0q0zx9zmhmnehnq4xvfnxdrx",
+ "bc1qwz82cujc9q5y035hs87waeswydjqs3w35jyxzq",
+ "bc1q0pq9lzpmzhndwuq4uv2h0satjddsr8z875klkz",
+ "bc1qttpzzuz2xqf72gamkq5yd4uu9m8phu393pgtg7",
+ "bc1q37qmppzlg6ycd65ap6px3ss7e97hnmapdfserw",
+ "bc1qmjuz63swd5y8knkfgt248v4fryuhvlutajey94",
+ "bc1qc9snwyszrsyyg48pfy0vs89mfw5mdj5ejh59hf",
+ "bc1qafmcmt0aph84zr8cvs2x50l9gcmzl38kjfxuf7"
+ ]
+ },
+ "channel_backups": {},
+ "fiat_value": {},
+ "invoices": {
+ "680430cbd35a47de0db297f94fedfc8f": {
+ "amount_sat": 100000000,
+ "bip70": null,
+ "exp": 0,
+ "id": "680430cbd35a47de0db297f94fedfc8f",
+ "message": "",
+ "outputs": [
+ [
+ 0,
+ "bc1qqg34zhhshx7spuwaln3ufcfz422rstsk5yhvnt",
+ 100000000
+ ]
+ ],
+ "requestor": null,
+ "time": 1782319641,
+ "type": 0
+ }
+ },
+ "keystore": {
+ "derivation": "m/0'",
+ "pw_hash_version": 1,
+ "root_fingerprint": "2643480a",
+ "seed": "fan gallery buyer fancy run prison trim verb census furnace visa mushroom",
+ "type": "bip32",
+ "xprv": "zprvAYqz81E1ibvkygZcBovjEYGj1zQLuZszvquYs9MTwwzrbzJkfmd1i2yNGphACANv1fDgLkL7vdcnGg9UC5kk8dZcF8Jf5jaCL4ZrBwHUs1K",
+ "xpub": "zpub6mqLXWkuYyV4CAe5HqTjbgDTa2EqK2brJ4q9fXm5WHXqUnduDJwGFqHr87JmXWdHnWFMExf7yAHi7uDTWdUYadtwQLd1WFxKHeTGgyYxXXn"
+ },
+ "labels": {
+ "bc1qqg34zhhshx7spuwaln3ufcfz422rstsk5yhvnt": "test"
+ },
+ "payment_requests": {
+ "bc1qqg34zhhshx7spuwaln3ufcfz422rstsk5yhvnt": {
+ "amount_sat": 300000000,
+ "bip70": null,
+ "exp": 604800,
+ "id": "81643d8628",
+ "message": "test",
+ "outputs": [
+ [
+ 0,
+ "bc1qqg34zhhshx7spuwaln3ufcfz422rstsk5yhvnt",
+ 300000000
+ ]
+ ],
+ "requestor": null,
+ "time": 1782319621,
+ "type": 0
+ }
+ },
+ "prevouts_by_scripthash": {},
+ "qt-console-history": [],
+ "seed_type": "segwit",
+ "seed_version": 31,
+ "spent_outpoints": {},
+ "stored_height": 955197,
+ "transactions": {},
+ "tx_fees": {},
+ "txi": {},
+ "txo": {},
+ "use_encryption": false,
+ "verified_tx3": {},
+ "wallet_nonce": 2,
+ "wallet_type": "standard",
+ "winpos-qt": [
+ 100,
+ 100,
+ 888,
+ 476
+ ]
+}
\ No newline at end of file
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.