Skip to content

Commit

Permalink
updates to allow for configurable vbat expiry and transition variables (
Browse files Browse the repository at this point in the history
#2052)

* updates to allow for configurable vbat expiry and transition variables

* vbat-deadline type correction
  • Loading branch information
husobee authored Oct 2, 2023
1 parent eb99e01 commit 9c86da1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions services/rewards/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ func (s *Service) GetParameters(ctx context.Context, currency *BaseCurrency) (*P
},
}

//vbatDeadline, ok := ctx.Value(appctx.ParametersVBATDeadlineCTXKey).(time.Time)
//if ok {
// params.VBATDeadline = vbatDeadline
//}

//transition, ok := ctx.Value(appctx.ParametersTransitionCTXKey).(bool)
//if ok {
params.Transition = false
//}
vbatDeadline, ok := ctx.Value(appctx.ParametersVBATDeadlineCTXKey).(time.Time)
if ok {
params.VBATDeadline = &vbatDeadline
}

transition, ok := ctx.Value(appctx.ParametersTransitionCTXKey).(bool)
if ok {
params.Transition = transition
}

return params, nil
}

0 comments on commit 9c86da1

Please sign in to comment.