Skip to content

Commit

Permalink
Merge branch 'dev' into metadata-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdavinchee authored Jan 5, 2024
2 parents dfa536a + 1bf8e7c commit 7bfe27f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/sdk-core/src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: "";
}
3 changes: 2 additions & 1 deletion packages/sdk-core/src/mapGetAllEventsQueryEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<events.UnknownEvent>({
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,
Expand Down

0 comments on commit 7bfe27f

Please sign in to comment.