fix: 12 word mnemonic (#4085)

This commit is contained in:
Vlad Stan 2026-07-23 20:07:29 +03:00 committed by GitHub
parent 03daf8b218
commit dc46bddc80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
import asyncio
import hashlib
import json
import secrets
import uuid
from collections.abc import AsyncGenerator
from pathlib import Path
@ -8,7 +9,6 @@ from typing import Any, cast
import httpx
from bolt11 import decode as bolt11_decode
from coincurve.keys import PrivateKey
from embit.bip39 import mnemonic_from_bytes, mnemonic_is_valid
from loguru import logger
@ -340,7 +340,7 @@ class SparkL2Wallet(Wallet):
return
logger.info("SPARK_L2_MNEMONIC is not set, one will be generated for you.")
mnemonic = mnemonic_from_bytes(PrivateKey().secret)
mnemonic = mnemonic_from_bytes(secrets.token_bytes(16))
await self._set_sidecar_mnemonic(mnemonic)
async def _set_sidecar_mnemonic(self, mnemonic: str):