From bec59c2c3764d1d7b1ef3e75dc68d3d18aed048b Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Wed, 21 Feb 2024 12:34:03 +0100 Subject: [PATCH] Remove unused parameters --- airgap/server/events.go | 6 +++--- airgap/server/server.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/airgap/server/events.go b/airgap/server/events.go index ca91660c..063b155c 100644 --- a/airgap/server/events.go +++ b/airgap/server/events.go @@ -28,7 +28,7 @@ var serverCallEventDefinitions = []*airgap.CeloEvent{ airgap.StableTokenTransferred, } -func hydrateEvents(srvCtx ServerContext, events []*airgap.CeloEvent) (map[*airgap.CeloEvent]airGapServerEvent, error) { +func hydrateEvents(events []*airgap.CeloEvent) (map[*airgap.CeloEvent]airGapServerEvent, error) { abis := make(map[string]*abi.ABI) for id, abiFactory := range abiFactoryMap { abi, err := abiFactory() @@ -49,12 +49,12 @@ func hydrateEvents(srvCtx ServerContext, events []*airgap.CeloEvent) (map[*airga return nil, fmt.Errorf("Missing event data for %s", event.Name) } - mappedEvents[event] = airgapEventFactory(srvCtx, evt, event) + mappedEvents[event] = airgapEventFactory(evt) } return mappedEvents, nil } -func airgapEventFactory(srvCtx ServerContext, evt abi.Event, event *airgap.CeloEvent) airGapServerEvent { +func airgapEventFactory(evt abi.Event) airGapServerEvent { return func(ctx context.Context, restTopics [][]common.Hash) [][]common.Hash { topic0 := evt.ID var topics [][]common.Hash diff --git a/airgap/server/server.go b/airgap/server/server.go index 4b531932..c7154465 100644 --- a/airgap/server/server.go +++ b/airgap/server/server.go @@ -52,7 +52,7 @@ func NewAirgapServer(chainId *big.Int, srvCtx ServerContext) (airgap.Server, err return nil, err } - callEvents, err := hydrateEvents(srvCtx, serverCallEventDefinitions) + callEvents, err := hydrateEvents(serverCallEventDefinitions) if err != nil { return nil, err }