Skip to content

Commit

Permalink
fix: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Jun 12, 2024
1 parent bfa3c11 commit 110d687
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x/tokenfactory/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ func (server msgServer) Burn(goCtx context.Context, msg *types.MsgBurn) (*types.
}
accountI := server.Keeper.accountKeeper.GetAccount(ctx, acc)
gasAfter1 := ctx.GasMeter().GasConsumed()
// Make this query gas free
// Note: this is only used in patch v2.11.4. Will be removed from v2.12.0 onwards
// Make this query gas free to prevent app mismatch when burning tf tokens
ctx.GasMeter().RefundGas(gasAfter1-gasBefore1, "refund gas account lookup to prevent app hash")

// Do this so we consume the previous gas too
// TODO: remove
_ = server.Keeper.accountKeeper.GetAccount(ctx, sdk.AccAddress(msg.BurnFromAddress))

_, ok := accountI.(authtypes.ModuleAccountI)
Expand Down

0 comments on commit 110d687

Please sign in to comment.