Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Dec 2, 2024
1 parent 4606952 commit 2972303
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/transport-http/src/subscribe/handlers/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type EventsArgs =
type EventsData =
SdkTransport.SubscriptionData<SdkTransport.SubscriptionTopic.EVENTS>

export type EventsArgsModel = (
export type EventsArgsDto = (
| {
start_block_id: string
}
Expand All @@ -21,7 +21,7 @@ export type EventsArgsModel = (
contracts?: string[]
}

type EventsDataModel = {
type EventsDataDto = {
block_id: string
block_height: number
block_timestamp: string
Expand All @@ -36,8 +36,8 @@ export const eventsHandler = createSubscriptionHandler<{
Topic: SdkTransport.SubscriptionTopic.EVENTS
Args: EventsArgs
Data: EventsData
ArgsModel: EventsArgsModel
DataModel: EventsDataModel
ArgsDto: EventsArgsDto
DataDto: EventsDataDto
}>({
topic: SdkTransport.SubscriptionTopic.EVENTS,
createSubscriber: (initialArgs, onData, onError) => {
Expand All @@ -46,7 +46,7 @@ export const eventsHandler = createSubscriptionHandler<{
}

return {
sendData(rawData: EventsDataModel) {
onData(rawData: EventsDataDto) {
// Parse the raw data
const result: EventsData = {
event: {
Expand All @@ -70,11 +70,11 @@ export const eventsHandler = createSubscriptionHandler<{

onData(result)
},
sendError(error: Error) {
onError(error: Error) {
onError(error)
},
encodeArgs(args: EventsArgs) {
let encodedArgs: EventsArgsModel = {
argsToDto(args: EventsArgs) {
let encodedArgs: EventsArgsDto = {
event_types: args.filter?.eventTypes,
addresses: args.filter?.addresses,
contracts: args.filter?.contracts,
Expand Down

0 comments on commit 2972303

Please sign in to comment.