diff --git a/httpd/handlers/addresses.go b/httpd/handlers/addresses.go index 71321e9..232ed65 100644 --- a/httpd/handlers/addresses.go +++ b/httpd/handlers/addresses.go @@ -7,6 +7,7 @@ import ( "strings" "github.com/ledgerhq/satstack/httpd/svc" + "github.com/ledgerhq/satstack/types" "github.com/ledgerhq/satstack/utils" "github.com/gin-gonic/gin" @@ -60,3 +61,12 @@ func GetAddresses(s svc.AddressesService) gin.HandlerFunc { ctx.JSON(http.StatusOK, addresses) } } + +func GetPendingAddresses(s svc.AddressesService) gin.HandlerFunc { + return func(ctx *gin.Context) { + var addresses types.Addresses + addresses.Transactions = []types.Transaction{} + + ctx.JSON(http.StatusOK, addresses.Transactions) + } +} diff --git a/httpd/router.go b/httpd/router.go index 2440f99..4ed5149 100644 --- a/httpd/router.go +++ b/httpd/router.go @@ -49,5 +49,9 @@ func GetRouter(s *svc.Service) *gin.Engine { addressesRouter.GET(":addresses/transactions", handlers.GetAddresses(s)) } + addressRouter := currencyRouter.Group("/address") + { + addressRouter.GET(":addresses/txs/pending", handlers.GetPendingAddresses(s)) + } return engine }