diff --git a/cmd/api/handler/address.go b/cmd/api/handler/address.go index 167effd..8a226be 100644 --- a/cmd/api/handler/address.go +++ b/cmd/api/handler/address.go @@ -511,7 +511,7 @@ func (handler *AddressHandler) Deposits(c echo.Context) error { return handleError(c, err, handler.address) } - if address.IsBridge { + if !address.IsBridge { return handleError(c, errors.Errorf("address %s is not bridge", req.Hash), handler.address) } diff --git a/cmd/api/handler/block_test.go b/cmd/api/handler/block_test.go index 2a769dc..a4e6097 100644 --- a/cmd/api/handler/block_test.go +++ b/cmd/api/handler/block_test.go @@ -35,6 +35,7 @@ var ( Nonce: 10, ActionsCount: 1, SignedTxCount: 1, + IsBridge: true, Balance: []*storage.Balance{ { Currency: currency.DefaultCurrency, diff --git a/cmd/api/init.go b/cmd/api/init.go index 07816af..04d751c 100644 --- a/cmd/api/init.go +++ b/cmd/api/init.go @@ -324,7 +324,7 @@ func initHandlers(ctx context.Context, e *echo.Echo, cfg Config, db postgres.Sto rollupGroup.GET("/all_actions", rollupsHandler.AllActions) rollupGroup.GET("/addresses", rollupsHandler.Addresses) rollupGroup.GET("/bridges", rollupsHandler.Bridges) - rollupGroup.GET("/deposits", addressHandlers.Deposits) + rollupGroup.GET("/deposits", rollupsHandler.Deposits) } }