From 3f4d131a8cb71d603e596de4006d9cba28a6162d Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Tue, 13 May 2025 10:23:56 -0400 Subject: [PATCH] chore(deps): gouroboros 0.120.1 Signed-off-by: Chris Gianelloni --- go.mod | 2 +- go.sum | 4 ++-- internal/api/localstatequery.go | 10 +++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index ac7b837..d2ffd58 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( connectrpc.com/grpchealth v1.4.0 connectrpc.com/grpcreflect v1.3.0 github.com/blinklabs-io/adder v0.28.0 - github.com/blinklabs-io/gouroboros v0.118.0 + github.com/blinklabs-io/gouroboros v0.120.1 github.com/blinklabs-io/tx-submit-api v0.20.8 github.com/gin-gonic/gin v1.10.0 github.com/gorilla/websocket v1.5.3 diff --git a/go.sum b/go.sum index 35581e8..54c0b0a 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5M github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/blinklabs-io/adder v0.28.0 h1:CrJ2jwR/LX+O1qHGNanR4bJulMX2tuIH6L8XhVGpmGA= github.com/blinklabs-io/adder v0.28.0/go.mod h1:K0ccxldfxDteR2cwizVoga1eYXRgpTyMbwZaotj1+Ns= -github.com/blinklabs-io/gouroboros v0.118.0 h1:6ntqmaYDVU/APofYUNdRR/9ssuoOmWyBLbsTA6J2Q7g= -github.com/blinklabs-io/gouroboros v0.118.0/go.mod h1:4slb9HmHNlV1Z7wi6WDDa9GlYCutff8qCEfGYRVN9i8= +github.com/blinklabs-io/gouroboros v0.120.1 h1:WcYVOwxQm/6E93qI3apCO2IPFQNoGlQIi34R58tya2Y= +github.com/blinklabs-io/gouroboros v0.120.1/go.mod h1:4slb9HmHNlV1Z7wi6WDDa9GlYCutff8qCEfGYRVN9i8= github.com/blinklabs-io/ouroboros-mock v0.3.7 h1:86FvD591XhdGk2BqQweRKfwc6Y6ll5Lunmo/RUehJ6o= github.com/blinklabs-io/ouroboros-mock v0.3.7/go.mod h1:611xZgdWCxZsSaS5tjgxqjmWIkSpsM9eKuQAKozw+sk= github.com/blinklabs-io/tx-submit-api v0.20.8 h1:SYe5jviJ2LCqICdKeSvY29IL0d00iwUytM54P/GBCUk= diff --git a/internal/api/localstatequery.go b/internal/api/localstatequery.go index e1101f8..116f2cc 100644 --- a/internal/api/localstatequery.go +++ b/internal/api/localstatequery.go @@ -133,12 +133,16 @@ func handleLocalStateQuerySystemStart(c *gin.Context) { c.JSON(500, apiError(err.Error())) return } - + // Validate data before conversion + if result.Year.Int64() > math.MaxInt { + c.JSON(500, apiError("invalid date conversion")) + return + } // Create response resp := responseLocalStateQuerySystemStart{ - Year: result.Year, + Year: int(result.Year.Int64()), Day: result.Day, - Picoseconds: result.Picoseconds, + Picoseconds: result.Picoseconds.Uint64(), } c.JSON(200, resp) }