From 387d3cdff9c4a962cebec7573777f852b9f6c37d Mon Sep 17 00:00:00 2001 From: sh-cha Date: Mon, 9 Sep 2024 18:30:51 +0900 Subject: [PATCH] add timestamp when other prices exist --- app/slinky.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/slinky.go b/app/slinky.go index 7ace344a..674930a9 100644 --- a/app/slinky.go +++ b/app/slinky.go @@ -165,6 +165,8 @@ func (oc oracleClientWithTimestamp) Prices(ctx context.Context, req *oracleserve return nil, err } - resp.Prices[l2slinky.ReservedCPTimestamp] = strconv.FormatInt(resp.Timestamp.UTC().UnixNano(), 10) + if resp != nil { + resp.Prices[l2slinky.ReservedCPTimestamp] = strconv.FormatInt(resp.Timestamp.UTC().UnixNano(), 10) + } return resp, err }