diff --git a/packages/sdk-core/src/events.ts b/packages/sdk-core/src/events.ts index 2b7e1beced..6f06fa367d 100644 --- a/packages/sdk-core/src/events.ts +++ b/packages/sdk-core/src/events.ts @@ -436,5 +436,6 @@ export interface BondIncreasedEvent extends EventBase { } export interface UnknownEvent extends EventBase { - name: string; + // @note using the string type breaks the type guard + name: ""; } diff --git a/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts b/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts index 349983651d..4323613dae 100644 --- a/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts +++ b/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts @@ -680,7 +680,8 @@ export const mapGetAllEventsQueryEvents = ( `An unknown event [${eventBase.name}] was detected which couldn't be properly mapped. Please update to the latest version of @superfluid-finance/sdk-core.` ); return typeGuard({ - name: eventBase.name, + // force casted as empty string for the type system + name: eventBase.name as "", id: eventBase.id, blockNumber: eventBase.blockNumber, transactionHash: eventBase.transactionHash,