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