File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1413,18 +1413,17 @@ async def create_billing_credit(request: Request):
14131413 description = description or "Top-up via billing portal" ,
14141414 )
14151415
1416- # Get updated balance
1417- billing = await get_chain_balance (user_party )
1418-
14191416 logger .info (f"💳 CreditReceipt created: { contract_id } for { user_party } - { amount } CC" )
14201417
1418+ # Intentionally NOT calling get_chain_balance() here. On a busy provider
1419+ # party (thousands of charges + credits) it adds ~25–30 round-trips of
1420+ # paginated /v2/updates walks (~30s) — long enough to exceed the
1421+ # autobot's 30s fetch timeout. Callers that need the post-credit
1422+ # balance should hit GET /billing/balance/{party_id} explicitly.
14211423 return JSONResponse (content = {
14221424 "success" : True ,
14231425 "contractId" : contract_id ,
14241426 "amount" : amount ,
1425- "balance" : billing .balance ,
1426- "totalCredited" : billing .total_credited ,
1427- "totalCharged" : billing .total_charged ,
14281427 })
14291428
14301429 except CantonBillingError as e :
You can’t perform that action at this time.
0 commit comments