Skip to content

Commit

Permalink
Fix: deposits endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Oct 17, 2024
1 parent 7b87cad commit 08a6370
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/api/handler/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
1 change: 1 addition & 0 deletions cmd/api/handler/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var (
Nonce: 10,
ActionsCount: 1,
SignedTxCount: 1,
IsBridge: true,
Balance: []*storage.Balance{
{
Currency: currency.DefaultCurrency,
Expand Down
2 changes: 1 addition & 1 deletion cmd/api/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 08a6370

Please sign in to comment.