File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ require (
99 connectrpc.com/grpchealth v1.4.0
1010 connectrpc.com/grpcreflect v1.3.0
1111 github.com/blinklabs-io/adder v0.28.0
12- github.com/blinklabs-io/gouroboros v0.118.0
12+ github.com/blinklabs-io/gouroboros v0.120.1
1313 github.com/blinklabs-io/tx-submit-api v0.20.8
1414 github.com/gin-gonic/gin v1.10.0
1515 github.com/gorilla/websocket v1.5.3
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5M
2121github.com/bits-and-blooms/bitset v1.8.0 /go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8 =
2222github.com/blinklabs-io/adder v0.28.0 h1:CrJ2jwR/LX+O1qHGNanR4bJulMX2tuIH6L8XhVGpmGA =
2323github.com/blinklabs-io/adder v0.28.0 /go.mod h1:K0ccxldfxDteR2cwizVoga1eYXRgpTyMbwZaotj1+Ns =
24- github.com/blinklabs-io/gouroboros v0.118.0 h1:6ntqmaYDVU/APofYUNdRR/9ssuoOmWyBLbsTA6J2Q7g =
25- github.com/blinklabs-io/gouroboros v0.118.0 /go.mod h1:4slb9HmHNlV1Z7wi6WDDa9GlYCutff8qCEfGYRVN9i8 =
24+ github.com/blinklabs-io/gouroboros v0.120.1 h1:WcYVOwxQm/6E93qI3apCO2IPFQNoGlQIi34R58tya2Y =
25+ github.com/blinklabs-io/gouroboros v0.120.1 /go.mod h1:4slb9HmHNlV1Z7wi6WDDa9GlYCutff8qCEfGYRVN9i8 =
2626github.com/blinklabs-io/ouroboros-mock v0.3.7 h1:86FvD591XhdGk2BqQweRKfwc6Y6ll5Lunmo/RUehJ6o =
2727github.com/blinklabs-io/ouroboros-mock v0.3.7 /go.mod h1:611xZgdWCxZsSaS5tjgxqjmWIkSpsM9eKuQAKozw+sk =
2828github.com/blinklabs-io/tx-submit-api v0.20.8 h1:SYe5jviJ2LCqICdKeSvY29IL0d00iwUytM54P/GBCUk =
Original file line number Diff line number Diff line change @@ -133,12 +133,16 @@ func handleLocalStateQuerySystemStart(c *gin.Context) {
133133 c .JSON (500 , apiError (err .Error ()))
134134 return
135135 }
136-
136+ // Validate data before conversion
137+ if result .Year .Int64 () > math .MaxInt {
138+ c .JSON (500 , apiError ("invalid date conversion" ))
139+ return
140+ }
137141 // Create response
138142 resp := responseLocalStateQuerySystemStart {
139- Year : result .Year ,
143+ Year : int ( result .Year . Int64 ()) ,
140144 Day : result .Day ,
141- Picoseconds : result .Picoseconds ,
145+ Picoseconds : result .Picoseconds . Uint64 () ,
142146 }
143147 c .JSON (200 , resp )
144148}
You can’t perform that action at this time.
0 commit comments