Skip to content
Snippets Groups Projects
Commit fce29b09 authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] wallet password set to AAAAAA if logging level is debug

to ease manual tests on development phase
parent ae27ba74
No related branches found
No related tags found
No related merge requests found
Pipeline #18434 waiting for manual action
......@@ -13,13 +13,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import hashlib
import logging
import random
import re
import string
from mnemonic import Mnemonic
from tikka.domains.entities.constants import MNEMONIC_LANGUAGES
from tikka.domains.entities.constants import MNEMONIC_LANGUAGES, WALLETS_PASSWORD_LENGTH
def generate_alphabetic(size: int = 5) -> str:
......@@ -29,6 +30,10 @@ def generate_alphabetic(size: int = 5) -> str:
:param size: Size of secret (default=5)
:return:
"""
# fixme: remove this for production release
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
return "A" * WALLETS_PASSWORD_LENGTH
return "".join(random.choice(string.ascii_letters).upper() for _ in range(size))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment