From 02ec98b2ac3c85627091d3d225147173d412c13c Mon Sep 17 00:00:00 2001 From: Daniel Wasserman Date: Fri, 5 Jul 2024 15:35:30 -0500 Subject: [PATCH] Cleanup: lint --- services/rfq/api/rest/handler.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/rfq/api/rest/handler.go b/services/rfq/api/rest/handler.go index 2b2318ffb5..7f982a5949 100644 --- a/services/rfq/api/rest/handler.go +++ b/services/rfq/api/rest/handler.go @@ -55,7 +55,7 @@ func (h *Handler) ModifyQuote(c *gin.Context) { return } - dbQuote, err := parseDBQuote(putRequest, relayerAddr) + dbQuote, err := parseDBQuote(*putRequest, relayerAddr) if err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) return @@ -102,7 +102,7 @@ func (h *Handler) ModifyBulkQuotes(c *gin.Context) { dbQuotes := []*db.Quote{} for _, quoteReq := range putRequest.Quotes { - dbQuote, err := parseDBQuote("eReq, relayerAddr) + dbQuote, err := parseDBQuote(quoteReq, relayerAddr) if err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid quote request"}) return @@ -118,18 +118,18 @@ func (h *Handler) ModifyBulkQuotes(c *gin.Context) { c.Status(http.StatusOK) } -func parseDBQuote(putRequest *model.PutQuoteRequest, relayerAddr interface{}) (*db.Quote, error) { +func parseDBQuote(putRequest model.PutQuoteRequest, relayerAddr interface{}) (*db.Quote, error) { destAmount, err := decimal.NewFromString(putRequest.DestAmount) if err != nil { - return nil, fmt.Errorf("Invalid DestAmount") + return nil, fmt.Errorf("invalid DestAmount") } maxOriginAmount, err := decimal.NewFromString(putRequest.MaxOriginAmount) if err != nil { - return nil, fmt.Errorf("Invalid MaxOriginAmount") + return nil, fmt.Errorf("invalid MaxOriginAmount") } fixedFee, err := decimal.NewFromString(putRequest.FixedFee) if err != nil { - return nil, fmt.Errorf("Invalid FixedFee") + return nil, fmt.Errorf("invalid FixedFee") } // nolint: forcetypeassert return &db.Quote{