diff --git a/src/app/api/cron/trade-history/route.ts b/src/app/api/cron/trade-history/route.ts index 7516bc44..c032538b 100644 --- a/src/app/api/cron/trade-history/route.ts +++ b/src/app/api/cron/trade-history/route.ts @@ -203,7 +203,9 @@ async function processTradeEvent( const timestampISO = await getTimestamp(log.blockNumber!); - const row: TradeInsert = { + // Note: user_address omitted — column does not exist in the DB yet. + // Add via migration, then restore user_address here. + const row: Omit = { token_address: tokenAddress, storyline_id: storylineId, event_type: isMint ? "mint" : "burn", @@ -215,7 +217,6 @@ async function processTradeEvent( tx_hash: log.transactionHash!.toLowerCase(), log_index: log.logIndex!, contract_address: MCV2_BOND.toLowerCase(), - user_address: args.user.toLowerCase(), }; const { error } = await supabase diff --git a/src/app/api/index/trade/route.ts b/src/app/api/index/trade/route.ts index a211d446..19a16db2 100644 --- a/src/app/api/index/trade/route.ts +++ b/src/app/api/index/trade/route.ts @@ -96,7 +96,7 @@ export async function POST(req: Request) { // Fall back to 0 } - const row: TradeInsert = { + const row: Omit = { token_address: tokenAddress, storyline_id: storyline.storyline_id, event_type: isMint ? "mint" : "burn", @@ -108,7 +108,6 @@ export async function POST(req: Request) { tx_hash: txHash.toLowerCase(), log_index: log.logIndex!, contract_address: MCV2_BOND.toLowerCase(), - user_address: args.user.toLowerCase(), }; const { error: dbError } = await supabase