Skip to content

Commit 681692f

Browse files
chore: remove leftover debug instrumentation from payout route
Removes four development-time logging calls that POST request metadata to a local ingest endpoint (127.0.0.1:7276). They are no-ops outside the original debugging session and add noise plus a per-request fetch attempt on the Gateway payout path.
1 parent ce792af commit 681692f

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

app/api/payout/route.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ export const POST = withAuth(async (req, { user, supabase }) => {
182182
const destinationAppKitChain =
183183
APP_KIT_CHAIN_BY_BLOCKCHAIN[destinationBlockchain];
184184

185-
// #region agent log
186-
fetch('http://127.0.0.1:7276/ingest/b6916372-e6aa-4804-b60b-f6f109736944',{method:'POST',headers:{'Content-Type':'application/json','X-Debug-Session-Id':'3365f4'},body:JSON.stringify({sessionId:'3365f4',runId:'pre-fix-1',hypothesisId:'H3',location:'app/api/payout/route.ts:178',message:'Gateway payout chain mapping',data:{requestedDestinationChain:destinationChain,destinationBlockchain,destinationAppKitChain:destinationAppKitChain ?? null},timestamp:Date.now()})}).catch(()=>{});
187-
// #endregion
188185

189186
if (!destinationAppKitChain) {
190187
return NextResponse.json(
@@ -237,9 +234,6 @@ export const POST = withAuth(async (req, { user, supabase }) => {
237234
);
238235
}
239236

240-
// #region agent log
241-
fetch('http://127.0.0.1:7276/ingest/b6916372-e6aa-4804-b60b-f6f109736944',{method:'POST',headers:{'Content-Type':'application/json','X-Debug-Session-Id':'3365f4'},body:JSON.stringify({sessionId:'3365f4',runId:'pre-fix-2',hypothesisId:'H5',location:'app/api/payout/route.ts:230',message:'Gateway signer/depositor split',data:{gatewaySignerAddressCount:gatewaySignerAddresses.length,selectedSignerAddress:`${gatewaySignerAddresses[0].slice(0,6)}...${gatewaySignerAddresses[0].slice(-4)}`,nonSignerAddressCount:nonGatewaySignerAddresses.size},timestamp:Date.now()})}).catch(()=>{});
242-
// #endregion
243237

244238
const { data: gatewayDeposits, error: gatewayDepositsError } =
245239
await supabase
@@ -273,9 +267,6 @@ export const POST = withAuth(async (req, { user, supabase }) => {
273267
)
274268
);
275269

276-
// #region agent log
277-
fetch('http://127.0.0.1:7276/ingest/b6916372-e6aa-4804-b60b-f6f109736944',{method:'POST',headers:{'Content-Type':'application/json','X-Debug-Session-Id':'3365f4'},body:JSON.stringify({sessionId:'3365f4',runId:'pre-fix-1',hypothesisId:'H1',location:'app/api/payout/route.ts:239',message:'Gateway payout source address candidates',data:{walletCount:wallets.length,gatewaySignerWalletCount:wallets.filter((wallet)=>wallet.type==='gateway_signer').length,nonGatewaySignerAddressCount:nonGatewaySignerAddresses.size,gatewayDepositRowCount:(gatewayDeposits ?? []).length,uniqueAddressCount:uniqueAddresses.length,uniqueAddressPreview:uniqueAddresses.slice(0,3).map((address)=>`${address.slice(0,6)}...${address.slice(-4)}`)},timestamp:Date.now()})}).catch(()=>{});
278-
// #endregion
279270

280271
if (uniqueAddresses.length === 0) {
281272
return NextResponse.json(
@@ -439,9 +430,6 @@ export const POST = withAuth(async (req, { user, supabase }) => {
439430
url?: unknown;
440431
};
441432
};
442-
// #region agent log
443-
fetch('http://127.0.0.1:7276/ingest/b6916372-e6aa-4804-b60b-f6f109736944',{method:'POST',headers:{'Content-Type':'application/json','X-Debug-Session-Id':'3365f4'},body:JSON.stringify({sessionId:'3365f4',runId:'pre-fix-1',hypothesisId:'H4',location:'app/api/payout/route.ts:329',message:'Gateway spend error details',data:{code:err?.code ?? null,type:err?.type ?? null,message:typeof err?.message==='string' ? err.message : String(err?.message ?? ''),shortMessage:typeof err?.shortMessage==='string' ? err.shortMessage : null,details:typeof err?.details==='string' ? err.details : null,causeCode:err?.cause?.code ?? null,causeStatus:err?.cause?.status ?? null,causeMethod:typeof err?.cause?.method === 'string' ? err.cause.method : null,causeUrl:typeof err?.cause?.url === 'string' ? err.cause.url : null},timestamp:Date.now()})}).catch(()=>{});
444-
// #endregion
445433
console.error("Gateway payout via unifiedBalance.spend failed:", error);
446434
const mappedError = getUnifiedBalancePayoutError(error);
447435
return NextResponse.json(

0 commit comments

Comments
 (0)