Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/app/api/cron/trade-history/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TradeInsert, "user_address"> = {
token_address: tokenAddress,
storyline_id: storylineId,
event_type: isMint ? "mint" : "burn",
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/app/api/index/trade/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export async function POST(req: Request) {
// Fall back to 0
}

const row: TradeInsert = {
const row: Omit<TradeInsert, "user_address"> = {
token_address: tokenAddress,
storyline_id: storyline.storyline_id,
event_type: isMint ? "mint" : "burn",
Expand All @@ -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
Expand Down
Loading