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), }