Skip to content

Commit

Permalink
Verification flow cmc changes. (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-myles authored Nov 26, 2024
1 parent 95a4ccc commit 456f05d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions cmd/eskimo-hut/kyc.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ func (s *service) VerifyKYCScenarios( //nolint:gocritic // .
func validateScenariosData(data *verificationscenarios.VerificationMetadata) error {
switch data.ScenarioEnum {
case verificationscenarios.CoinDistributionScenarioCmc:
if data.CMCProfileLink == "" {
return errors.Errorf("empty cmc profile link `%v`", data.CMCProfileLink)
if data.CMCProfileLink == "" || !strings.HasPrefix(data.CMCProfileLink, "https://coinmarketcap.com") {
return errors.Errorf("wrong cmc profile link `%v`", data.CMCProfileLink)
}
case verificationscenarios.CoinDistributionScenarioTwitter:
if data.Language == "" {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/google/uuid v1.6.0
github.com/hashicorp/go-multierror v1.1.1
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb
github.com/ice-blockchain/santa v1.178.0
github.com/ice-blockchain/santa v1.181.0
github.com/ice-blockchain/wintr v1.154.0
github.com/imroc/req/v3 v3.48.0
github.com/ip2location/ip2location-go/v9 v9.7.0
Expand Down Expand Up @@ -139,7 +139,7 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/quic-go/quic-go v0.48.1 // indirect
github.com/quic-go/quic-go v0.48.2 // indirect
github.com/refraction-networking/utls v1.6.7 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/rs/zerolog v1.33.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb h1:8TnFP3mc7O+tc44kv2e0/TpZKnEVUaKH+UstwfBwRkk=
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb/go.mod h1:ZsQU7i3mxhgBBu43Oev7WPFbIjP4TniN/b1UPNGbrq8=
github.com/ice-blockchain/santa v1.178.0 h1:6Pi3yJzVZfO4zW9M2+ylrrX8J3hwUj3UohpBab41LNk=
github.com/ice-blockchain/santa v1.178.0/go.mod h1:r+iUCqHKRYr4hNdmnypfQ6Zdiug/sJqUT8s5aEeoKH0=
github.com/ice-blockchain/santa v1.181.0 h1:TjlYV8Ayz2fLKx+pJUY+J5Bh0Jc1zNPrZv16tcL9MPE=
github.com/ice-blockchain/santa v1.181.0/go.mod h1:WJGs17EYYH+f+GX1zLUXb01nKs9SXsvNvTDxgvZfNwU=
github.com/ice-blockchain/wintr v1.154.0 h1:yZSQtAEwGHTSmJ5pXjX0tpui1TNnG615QfpBkhY99a4=
github.com/ice-blockchain/wintr v1.154.0/go.mod h1:DoUn66XJGzPzfCZTsHyMjfgj2aVLGvjqDSuKj2pa3KE=
github.com/imroc/req/v3 v3.48.0 h1:IYuMGetuwLzOOTzDCquDqs912WNwpsPK0TBXWPIvoqg=
Expand Down Expand Up @@ -362,8 +362,8 @@ github.com/prometheus/prometheus v0.300.0 h1:nVxAKi1ceyQxKa8r3gzMQyp7pMLeN1sPWvO
github.com/prometheus/prometheus v0.300.0/go.mod h1:gtTPY/XVyCdqqnjA3NzDMb0/nc5H9hOu1RMame+gHyM=
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
github.com/quic-go/quic-go v0.48.1 h1:y/8xmfWI9qmGTc+lBr4jKRUWLGSlSigv847ULJ4hYXA=
github.com/quic-go/quic-go v0.48.1/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs=
github.com/quic-go/quic-go v0.48.2 h1:wsKXZPeGWpMpCGSWqOcqpW2wZYic/8T3aqiOID0/KWE=
github.com/quic-go/quic-go v0.48.2/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs=
github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E=
github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw=
github.com/refraction-networking/utls v1.6.7 h1:zVJ7sP1dJx/WtVuITug3qYUq034cDq9B2MR1K67ULZM=
Expand Down
18 changes: 9 additions & 9 deletions kyc/verification_scenarios/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ const (
var (
//nolint:gochecknoglobals,gomnd // We need it to sort scenarios.
scenarioOrder = map[Scenario]int{
CoinDistributionScenarioCmc: 0,
Scenario(CoinDistributionScenarioSignUpSunwaves): 1,
Scenario(CoinDistributionScenarioSignUpCallfluent): 2,
Scenario(CoinDistributionScenarioSignUpDoctorx): 3,
Scenario(CoinDistributionScenarioSignUpSauces): 4,
Scenario(CoinDistributionScenarioSignUpSealsend): 5,
Scenario(CoinDistributionScenarioSignUpCryptomayors): 6,
CoinDistributionScenarioTwitter: 7,
CoinDistributionScenarioTelegram: 8,
Scenario(CoinDistributionScenarioSignUpSunwaves): 0,
Scenario(CoinDistributionScenarioSignUpCallfluent): 1,
Scenario(CoinDistributionScenarioSignUpDoctorx): 2,
Scenario(CoinDistributionScenarioSignUpSauces): 3,
Scenario(CoinDistributionScenarioSignUpSealsend): 4,
Scenario(CoinDistributionScenarioSignUpCryptomayors): 5,
CoinDistributionScenarioTwitter: 6,
CoinDistributionScenarioTelegram: 7,
CoinDistributionScenarioCmc: 8,
}
)

Expand Down
6 changes: 4 additions & 2 deletions kyc/verification_scenarios/verification_scenarios.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ func (r *repository) VerifyScenarios(ctx context.Context, metadata *Verification
}
switch metadata.ScenarioEnum {
case CoinDistributionScenarioCmc:
if vErr := r.VerifyCMC(ctx, metadata); vErr != nil {
return nil, errors.Wrapf(vErr, "haven't passed the CMC verification for userID:%v", metadata.UserID)
if false {
if vErr := r.VerifyCMC(ctx, metadata); vErr != nil {
return nil, errors.Wrapf(vErr, "haven't passed the CMC verification for userID:%v", metadata.UserID)
}
}
case CoinDistributionScenarioTwitter:
if metadata.TweetURL == "" {
Expand Down

0 comments on commit 456f05d

Please sign in to comment.