fix: coinbase float user id (#2149)

This commit is contained in:
Carlos Quintana 2024-07-10 09:58:17 +02:00 committed by GitHub
parent ae9f47d5a5
commit 87e55605b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -702,7 +702,12 @@ def setup_coinbase_commerce(app):
def handle_coinbase_event(event) -> bool: def handle_coinbase_event(event) -> bool:
user_id = int(event["data"]["metadata"]["user_id"]) server_user_id = event["data"]["metadata"]["user_id"]
try:
user_id = int(server_user_id)
except ValueError:
user_id = int(float(server_user_id))
code = event["data"]["code"] code = event["data"]["code"]
user = User.get(user_id) user = User.get(user_id)
if not user: if not user: