Skip to content

Commit

Permalink
fix Test
Browse files Browse the repository at this point in the history
  • Loading branch information
cherry-yl-sh committed Jun 20, 2024
1 parent 800c903 commit f3c7197
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/global_const/common_const.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (

ContextKeyApiMoDel = "api_model"
StrategyStatusDisable StrategyStatus = "disable"
StrategyStatusAchieve StrategyStatus = "enable"
StrategyStatusAchive StrategyStatus = "enable"
)

var (
Expand Down
4 changes: 4 additions & 0 deletions common/price_compoent/price_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ func GetPriceUsd(tokenType global_const.TokenType) (float64, error) {
}

defer func(Body io.ReadCloser) {
if p := recover(); p != nil {
logrus.Error("panic: ", p)
return
}
if Body == nil {
return
}
Expand Down
2 changes: 1 addition & 1 deletion service/dashboard_service/dashboard_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func GetSuitableStrategyWithOutCode(entryPointVersion global_const.EntrypointVer
IsProjectErc20PayEnable: isPerc20Enable,
},
ExecuteRestriction: &model.StrategyExecuteRestriction{
Status: global_const.StrategyStatusAchieve,
Status: global_const.StrategyStatusAchive,
},
Erc20TokenType: gasUseToken,
}
Expand Down
2 changes: 1 addition & 1 deletion service/validator_service/basic_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func ValidateStrategy(strategy *model.Strategy, request *model.UserOpRequest) er
if strategy.ExecuteRestriction == nil {
return xerrors.Errorf("ExecuteRestriction is Empty")
}
if strategy.ExecuteRestriction.Status != global_const.StrategyStatusAchieve {
if strategy.ExecuteRestriction.Status != global_const.StrategyStatusAchive {
return xerrors.Errorf("strategy status is not active")
}
curTime := time.Now().Unix()
Expand Down

0 comments on commit f3c7197

Please sign in to comment.