Skip to content

Commit

Permalink
refactor: use GetContext to get macine context
Browse files Browse the repository at this point in the history
  • Loading branch information
r3v4s committed Jun 5, 2024
1 parent bf375c6 commit 2525776
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gnovm/stdlibs/std/emit_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func X_emit(m *gno.Machine, typ string, attrs []string) {
PrevPkgAddr: prevAddr,
}

ctx := m.Context.(ExecContext)
ctx := GetContext(m)

evt := gnoEvent{
OrigCaller: ctx.OrigCaller.String(),
Expand All @@ -38,7 +38,7 @@ func X_emit(m *gno.Machine, typ string, attrs []string) {
Type: typ,
Attributes: eventAttrs,
}
ctx := GetContext(m)

ctx.EventLogger.EmitEvent(evt)
}

Expand Down

0 comments on commit 2525776

Please sign in to comment.