Skip to content

Commit

Permalink
fix: actually set err so that the defer to cleanup after amend runs
Browse files Browse the repository at this point in the history
  • Loading branch information
wwestgarth committed Aug 16, 2024
1 parent 96f74e1 commit f86bf7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/execution/future/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -5589,7 +5589,8 @@ func (m *Market) AmendAMM(ctx context.Context, amend *types.AmendAMM, determinis
m.log.Panic("unable to restore AMM balances after failed amend", logging.Error(err))
}
}
return common.ErrAMMCannotRebase
err = common.ErrAMMCannotRebase // set it to err so that the defer runs
return err
}

m.amm.Confirm(ctx, pool)
Expand Down

0 comments on commit f86bf7b

Please sign in to comment.