Skip to content

Commit

Permalink
fix: avoid bug where incorrect Fees may exist on TickUpdate events
Browse files Browse the repository at this point in the history
  • Loading branch information
dib542 committed Mar 28, 2024
1 parent c36b1b8 commit e65cc18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/storage/sqlite3/ingest/tables/event.TickUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export default async function insertEventTickUpdate(
${txEvent.attributes['TokenIn']},
${txEvent.attributes['TickIndex']},
${txEvent.attributes['Reserves']},
${txEvent.attributes['Fee'] || null},
-- set either TrancheKey or Fee: a Fee where TrancheKey exists is a bug
-- see: https://github.com/neutron-org/neutron/pull/473
${txEvent.attributes['TrancheKey'] ? null : txEvent.attributes['Fee']},
${txEvent.attributes['TrancheKey'] || null},
-- derive the difference in reserves from the previous tick state
Expand Down

0 comments on commit e65cc18

Please sign in to comment.