Skip to content

Commit

Permalink
added new name
Browse files Browse the repository at this point in the history
  • Loading branch information
judezhu committed Aug 17, 2024
1 parent 0f9969b commit f32c479
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/go/events/moment_destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
)

const (
EventMomentDestroyed = "TopShot.MomentDestroyed"
EventMomentDestroyed = "TopShot.MomentDestroyed"
EventMomentDestroyedV2 = "TopShot.NFT.ResourceDestroyed"
)

type MomentDestroyedEvent interface {
Expand All @@ -24,7 +25,7 @@ func DecodeMomentDestroyedEvent(b []byte) (MomentDestroyedEvent, error) {
if err != nil {
return nil, err
}
if cadenceValue.EventType.QualifiedIdentifier != EventMomentDestroyed {
if cadenceValue.EventType.QualifiedIdentifier != EventMomentDestroyed && cadenceValue.EventType.QualifiedIdentifier != EventMomentDestroyedV2 {
return nil, fmt.Errorf("unexpected event type: %s", cadenceValue.EventType.QualifiedIdentifier)
}
eventMap, err := decoder.ConvertEvent(cadenceValue)
Expand Down

0 comments on commit f32c479

Please sign in to comment.