From f32c4794493f2e0bdedca672a0d3a31cda8308a8 Mon Sep 17 00:00:00 2001 From: Jude Zhu Date: Fri, 16 Aug 2024 18:24:57 -0700 Subject: [PATCH] added new name --- lib/go/events/moment_destroy.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/go/events/moment_destroy.go b/lib/go/events/moment_destroy.go index b3ebe0f..55e9449 100644 --- a/lib/go/events/moment_destroy.go +++ b/lib/go/events/moment_destroy.go @@ -6,7 +6,8 @@ import ( ) const ( - EventMomentDestroyed = "TopShot.MomentDestroyed" + EventMomentDestroyed = "TopShot.MomentDestroyed" + EventMomentDestroyedV2 = "TopShot.NFT.ResourceDestroyed" ) type MomentDestroyedEvent interface { @@ -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)