From 23b429416efd59dd47832dfcd1c79b37f4cef1d8 Mon Sep 17 00:00:00 2001 From: Artem Date: Tue, 5 Nov 2024 22:12:13 +0300 Subject: [PATCH] Fix: search addresses --- cmd/api/init.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/api/init.go b/cmd/api/init.go index 584bd40..66283da 100644 --- a/cmd/api/init.go +++ b/cmd/api/init.go @@ -262,15 +262,15 @@ func initHandlers(ctx context.Context, e *echo.Echo, cfg Config, db postgres.Sto v1.GET("/constants", constantsHandler.Get) v1.GET("/enums", constantsHandler.Enums) - searchHandler := handler.NewSearchHandler(constantCache, db.Search, db.Address, db.Blocks, db.Tx, db.Rollup, db.Bridges, db.Validator) - v1.GET("/search", searchHandler.Search) - constantObserver := dispatcher.Observe(storage.ChannelConstant) constantCache = cache.NewConstantsCache(constantObserver) if err := constantCache.Start(ctx, db.Constants); err != nil { panic(err) } + searchHandler := handler.NewSearchHandler(constantCache, db.Search, db.Address, db.Blocks, db.Tx, db.Rollup, db.Bridges, db.Validator) + v1.GET("/search", searchHandler.Search) + addressHandler := handler.NewAddressHandler(constantCache, db.Address, db.Tx, db.Action, db.Rollup, db.Fee, db.Bridges, db.Deposit, db.State, cfg.Indexer.Name) addressesGroup := v1.Group("/address") {