Skip to content

Commit

Permalink
Make sure to re-fetch updated perpetual before emitting indexer event
Browse files Browse the repository at this point in the history
  • Loading branch information
hwray committed Nov 22, 2024
1 parent 9a3adf2 commit 84c14f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions protocol/x/listing/keeper/listing.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ func (k Keeper) UpgradeIsolatedPerpetualToCross(
return err
}

// Fetch updated perpetual data after the upgrade
perpetual, err = k.PerpetualsKeeper.GetPerpetual(ctx, perpetualId)
if err != nil {
return err
}

// Emit indexer event.
k.GetIndexerEventManager().AddTxnEvent(
ctx,
Expand Down

0 comments on commit 84c14f7

Please sign in to comment.