Skip to content

Commit 1903164

Browse files
authored
Do not replace gas meter when creating synthetic events (#82)
1 parent 3dba3c6 commit 1903164

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

x/wasm/keeper/keeper.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,10 @@ func (k Keeper) emitCW721OwnerBeforeTransferIfApplicable(ctx sdk.Context, contra
11411141
if err != nil {
11421142
return
11431143
}
1144-
resBz, err := k.QuerySmart(ctx.WithGasMeter(sdk.NewInfiniteGasMeterWithMultiplier(ctx)), contractAddress, ownerQueryBz)
1144+
if ctx.IsTracing() {
1145+
ctx = ctx.WithGasMeter(sdk.NewInfiniteGasMeterWithMultiplier(ctx))
1146+
}
1147+
resBz, err := k.QuerySmart(ctx, contractAddress, ownerQueryBz)
11451148
if err != nil {
11461149
return
11471150
}

0 commit comments

Comments
 (0)