fix new dict of dlt_secrets

This commit is contained in:
Cayo Puigdefabregas 2024-01-24 14:47:42 +01:00
parent 87e3c3e917
commit 0197ddb4d1
3 changed files with 5 additions and 5 deletions

View File

@ -70,7 +70,7 @@ class LoginForm(FlaskForm):
self.form_errors.append(self.error_messages['inactive'])
if 'dpp' in app.blueprints.keys():
dlt_keys = user.get_dlt_keys(self.password.data).get('data', {})
dlt_keys = user.get_dlt_keys(self.password.data)
token_dlt = dlt_keys.get('api_token')
eth_pub_key = dlt_keys.get('eth_pub_key')
session['token_dlt'] = token_dlt

View File

@ -43,9 +43,9 @@ class RegisterUserDlt:
user = User(email=email, password=password)
user.individuals.add(Person(name=name))
# import pdb; pdb.set_trace()
try:
response = register_user(api_dlt, eth_priv_key)
response = register_user(api_dlt, privateKey=eth_priv_key[2:])
api_token = response.get('data', {}).get('api_token')
except Exception:
api_token = ""
@ -70,5 +70,5 @@ class RegisterUserDlt:
user.rols_dlt = json.dumps(roles)
if not user.id:
db.session.add(user)
# if not user.id:
db.session.add(user)