From 20ae8e03356554fd572d3635835aee186b2bdbe9 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Mon, 23 Dec 2024 19:07:22 +0800 Subject: [PATCH] update --- app/hdl/hdl_points_center.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/hdl/hdl_points_center.go b/app/hdl/hdl_points_center.go index 228173e..ce0a875 100644 --- a/app/hdl/hdl_points_center.go +++ b/app/hdl/hdl_points_center.go @@ -920,8 +920,13 @@ func PointsCenterCalcExchange(c *gin.Context) { e.OutErr(c, e.ERR, err.Error()) return } + amountDecimal, err := decimal.NewFromString(exchangeResp.GetEggEnergyAmount) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } resp := md.PointsCenterCalcExchangeResp{ - Value: exchangeResp.GetEggEnergyAmount, + Value: amountDecimal.StringFixed(2), Fee: feeDecimal.StringFixed(2), }