Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions httpd/handlers/addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
}
4 changes: 4 additions & 0 deletions httpd/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}