Skip to content

Commit

Permalink
attempt to fix infinite active t1 referrals decreasing
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-ares committed Jun 21, 2024
1 parent 2907bd6 commit c41e6b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions miner/mining.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func mine(now *time.Time, usr *user, t0Ref, tMinus1Ref *referral) (updatedUser *
(!updatedUser.ReferralsCountChangeGuardUpdatedAt.IsNil() &&
!updatedUser.MiningSessionSoloStartedAt.IsNil() &&
updatedUser.ReferralsCountChangeGuardUpdatedAt.Equal(*updatedUser.MiningSessionSoloStartedAt.Time)) {
updatedUser.BalanceLastUpdatedAt = now
// We need to update ReferralsCountChangeGuardUpdatedAt last time to avoid ErrDuplicate on next sessions
return updatedUser, shouldGenerateHistory, IDT0Changed, 0, 0
}
Expand Down
1 change: 1 addition & 0 deletions tokenomics/kyc.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ func (r *repository) overrideKYCStateWithEskimoKYCState(ctx context.Context, use
state.KYCState = usr.KYCState
usr.HideRanking = buildHideRanking(usr.HiddenProfileElements)
usr.CreatedAt = time.New(usr.AccountCreatedAt)
usr.ProfilePictureName = r.pictureClient.StripDownloadURL(usr.ProfilePictureName)

return usr.KycFaceAvailable, multierror.Append(
errors.Wrapf(r.updateUsernameKeywords(ctx, state.ID, state.Username, usr.Username), "failed to updateUsernameKeywords for oldUser:%#v, user:%#v", state, usr), //nolint:lll // .
Expand Down

0 comments on commit c41e6b7

Please sign in to comment.