Skip to content

Commit

Permalink
updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-ares committed Jun 27, 2024
1 parent 13d6569 commit 6a7a4b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
23 changes: 12 additions & 11 deletions kyc/social/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,17 @@ type (
}

config struct {
alertFrequency *sync.Map // .map[users.KYCStep]stdlibtime.Duration.
kycConfigJSON *atomic.Pointer[kycConfigJSON]
ConfigJSONURL string `yaml:"config-json-url" mapstructure:"config-json-url"` //nolint:tagliatelle // .
Environment string `yaml:"environment" mapstructure:"environment"`
AlertSlackWebhook string `yaml:"alert-slack-webhook" mapstructure:"alert-slack-webhook"` //nolint:tagliatelle // .
TenantName string `yaml:"tenant-name" mapstructure:"tenant-name"` //nolint:tagliatelle // .
DelayBetweenSessions stdlibtime.Duration `yaml:"delay-between-sessions" mapstructure:"delay-between-sessions"` //nolint:tagliatelle // .
SessionWindow stdlibtime.Duration `yaml:"session-window" mapstructure:"session-window"` //nolint:tagliatelle // .
MaxSessionsAllowed int `yaml:"max-sessions-allowed" mapstructure:"max-sessions-allowed"` //nolint:tagliatelle // .
MaxAttemptsAllowed uint8 `yaml:"max-attempts-allowed" mapstructure:"max-attempts-allowed"` //nolint:tagliatelle // .
EnableAlerts bool `yaml:"enable-alerts" mapstructure:"enable-alerts"` //nolint:tagliatelle // .
alertFrequency *sync.Map // .map[users.KYCStep]stdlibtime.Duration.
kycConfigJSON *atomic.Pointer[kycConfigJSON]
ConfigJSONURL string `yaml:"config-json-url" mapstructure:"config-json-url"` //nolint:tagliatelle // .
Environment string `yaml:"environment" mapstructure:"environment"`
AlertSlackWebhook string `yaml:"alert-slack-webhook" mapstructure:"alert-slack-webhook"` //nolint:tagliatelle // .
TenantName string `yaml:"tenant-name" mapstructure:"tenant-name"` //nolint:tagliatelle // .
ReferralInviteURLPrefix string `yaml:"referralInviteUrlPrefix" mapstructure:"referralInviteUrlPrefix"` //nolint:tagliatelle // .
DelayBetweenSessions stdlibtime.Duration `yaml:"delay-between-sessions" mapstructure:"delay-between-sessions"` //nolint:tagliatelle // .
SessionWindow stdlibtime.Duration `yaml:"session-window" mapstructure:"session-window"` //nolint:tagliatelle // .
MaxSessionsAllowed int `yaml:"max-sessions-allowed" mapstructure:"max-sessions-allowed"` //nolint:tagliatelle // .
MaxAttemptsAllowed uint8 `yaml:"max-attempts-allowed" mapstructure:"max-attempts-allowed"` //nolint:tagliatelle // .
EnableAlerts bool `yaml:"enable-alerts" mapstructure:"enable-alerts"` //nolint:tagliatelle // .
}
)
6 changes: 2 additions & 4 deletions kyc/social/social.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,8 @@ func (r *repository) VerifyPost(ctx context.Context, metadata *VerificationMetad
ExpectedPostURL: r.expectedPostURL(metadata),
}
if true { // Because we want to be less strict, for the moment.
pvm.ExpectedPostText = fmt.Sprintf("%q", user.Username)
}
if metadata.KYCStep == users.Social2KYCStep {
pvm.ExpectedPostText = ""
pvm.ExpectedPostText = fmt.Sprintf("%v%v", r.cfg.ReferralInviteURLPrefix, user.Username)
pvm.ExpectedPostURL = ""
}
if metadata.Language == "zzzzzzzzzz" { // This is for testing purposes.
stdlibtime.Sleep(120 * stdlibtime.Second) //nolint:gomnd // .
Expand Down

0 comments on commit 6a7a4b9

Please sign in to comment.