质押奖励保留两位小数
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/spf13/cast"
|
||||
"math"
|
||||
"nova_task/internal/model"
|
||||
"nova_task/internal/pkg/errs"
|
||||
"nova_task/internal/pkg/utils"
|
||||
@@ -95,9 +96,9 @@ func (l *GetStakeTaskDetailLogic) GetStakeTaskDetail() (*types.StakeTaskDetail,
|
||||
StartDate: start.Format(time.DateOnly),
|
||||
EndDate: end.Format(time.DateOnly),
|
||||
CountDown: utils.TodayRemainSeconds(),
|
||||
ProduceTokensToday: produceTokensToday,
|
||||
ProduceTokensToday: math.Round(produceTokensToday*100) / 100,
|
||||
GameBonus: gameBonus,
|
||||
CanReceiveTokens: canReceiveTokens,
|
||||
TotalIncomeTokens: totalIncomeReward,
|
||||
CanReceiveTokens: math.Round(canReceiveTokens*100) / 100,
|
||||
TotalIncomeTokens: math.Round(totalIncomeReward*100) / 100,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user