try optimize setup
This commit is contained in:
parent
6b3ed99876
commit
93adfa6d27
|
|
@ -106,12 +106,17 @@ async def s_api_v1_auth_twa(request):
|
||||||
user_id=known_user.id,
|
user_id=known_user.id,
|
||||||
network='ton',
|
network='ton',
|
||||||
wallet_key='web2-client==1',
|
wallet_key='web2-client==1',
|
||||||
connection_id=connection_payload,
|
# `ton_proof.payload` is expected to be single-use in many wallets (and it is unique per auth call here),
|
||||||
|
# but client-side retries/replays can happen; keep payload separately and make DB id unique.
|
||||||
|
connection_id=f"{connection_payload}.{uuid4().hex}",
|
||||||
wallet_address=Address(wallet_info.account.address).to_string(1, 1, 1),
|
wallet_address=Address(wallet_info.account.address).to_string(1, 1, 1),
|
||||||
keys={
|
keys={
|
||||||
'ton_proof': auth_data['ton_proof']
|
'ton_proof': auth_data['ton_proof'],
|
||||||
|
'ton_proof_payload': connection_payload,
|
||||||
|
},
|
||||||
|
meta={
|
||||||
|
'ton_proof_payload': connection_payload,
|
||||||
},
|
},
|
||||||
meta={},
|
|
||||||
created=datetime.now(),
|
created=datetime.now(),
|
||||||
updated=datetime.now(),
|
updated=datetime.now(),
|
||||||
invalidated=False,
|
invalidated=False,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue