Skip to content

Commit

Permalink
Merge pull request #56 from mysteriumnetwork/add-default-country
Browse files Browse the repository at this point in the history
Fallback country to NL if we failed to detect it from consumer location.
  • Loading branch information
soffokl authored May 27, 2022
2 parents b46f400 + 41e6c5f commit 4f46dd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions proposal/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (a *API) Proposals(c *gin.Context) {
if len(opts.from) != 2 {
country, err := a.location.Country(c.ClientIP())
if err != nil {
opts.from = "NL" // Default to Netherlands since we have monitoring agent running there.
log.Warn().Err(err).Msg("Failed to autodetect client country")
} else {
opts.from = country
Expand Down

0 comments on commit 4f46dd1

Please sign in to comment.