Skip to content
Snippets Groups Projects
Commit e8edb7b2 authored by Josh Brooks's avatar Josh Brooks
Browse files

Merge branch 'newRegions' into 'dev'

Refactor of regions

See merge request !41
parents 289d6f20 ea70d0da
No related branches found
No related tags found
3 merge requests!53Release,!45Dev,!41Refactor of regions
...@@ -611,10 +611,20 @@ func (c *Client) GetPreferredBins(countryCode string) ([]string, error) { ...@@ -611,10 +611,20 @@ func (c *Client) GetPreferredBins(countryCode string) ([]string, error) {
// Add additional bins in special cases // Add additional bins in special cases
switch bin { switch bin {
case region.Africa: case region.SouthAndCentralAmerica:
bins = append(bins, region.WesternEurope.String()) bins = append(bins, region.NorthAmerica.String())
case region.MiddleEast: case region.MiddleEast:
bins = append(bins, region.EasternEurope.String()) bins = append(bins, region.EasternEurope.String(), region.CentralEurope.String(), region.WesternAsia.String())
case region.NorthernAfrica:
bins = append(bins, region.WesternEurope.String(), region.CentralEurope.String())
case region.SouthernAfrica:
bins = append(bins, region.WesternEurope.String(), region.CentralEurope.String())
case region.EasternAsia:
bins = append(bins, region.WesternAsia.String(), region.Oceania.String(), region.NorthAmerica.String())
case region.WesternAsia:
bins = append(bins, region.EasternAsia.String(), region.Russia.String(), region.MiddleEast.String())
case region.Oceania:
bins = append(bins, region.EasternAsia.String(), region.NorthAmerica.String())
} }
return bins, nil return bins, nil
......
...@@ -23,7 +23,7 @@ require ( ...@@ -23,7 +23,7 @@ require (
gitlab.com/elixxir/primitives v0.0.3-0.20211012201904-909f995234c4 gitlab.com/elixxir/primitives v0.0.3-0.20211012201904-909f995234c4
gitlab.com/xx_network/comms v0.0.4-0.20211012201830-5f8d4f171a3b gitlab.com/xx_network/comms v0.0.4-0.20211012201830-5f8d4f171a3b
gitlab.com/xx_network/crypto v0.0.5-0.20211012201721-71f9e80ffdb7 gitlab.com/xx_network/crypto v0.0.5-0.20211012201721-71f9e80ffdb7
gitlab.com/xx_network/primitives v0.0.4-0.20211012163930-7d585c6d1cb4 gitlab.com/xx_network/primitives v0.0.4-0.20211012223012-194559429814
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 golang.org/x/net v0.0.0-20210525063256-abc453219eb5
google.golang.org/genproto v0.0.0-20210105202744-fe13368bc0e1 // indirect google.golang.org/genproto v0.0.0-20210105202744-fe13368bc0e1 // indirect
......
...@@ -279,6 +279,10 @@ gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da/go.mod h1:OK ...@@ -279,6 +279,10 @@ gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da/go.mod h1:OK
gitlab.com/xx_network/primitives v0.0.2/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc= gitlab.com/xx_network/primitives v0.0.2/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc=
gitlab.com/xx_network/primitives v0.0.4-0.20211012163930-7d585c6d1cb4 h1:EoRGPEZWUhOM/TquRGkFXoq4vC2OKv/uCPx1IW+iS0k= gitlab.com/xx_network/primitives v0.0.4-0.20211012163930-7d585c6d1cb4 h1:EoRGPEZWUhOM/TquRGkFXoq4vC2OKv/uCPx1IW+iS0k=
gitlab.com/xx_network/primitives v0.0.4-0.20211012163930-7d585c6d1cb4/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE= gitlab.com/xx_network/primitives v0.0.4-0.20211012163930-7d585c6d1cb4/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20211012203555-c393217587ae h1:3sbwClqqSQ3oh/QVx8Q8/RJSqERJcpqbZPxFNIIWF2M=
gitlab.com/xx_network/primitives v0.0.4-0.20211012203555-c393217587ae/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20211012223012-194559429814 h1:Q2ls4hkg/iN8grEX27/yPX16HO2bj6cC3mxBP3HW8Ts=
gitlab.com/xx_network/primitives v0.0.4-0.20211012223012-194559429814/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/ring v0.0.3-0.20210527191221-ce3f170aabd5 h1:FY+4Rh1Q2rgLyv10aKJjhWApuKRCR/054XhreudfAvw= gitlab.com/xx_network/ring v0.0.3-0.20210527191221-ce3f170aabd5 h1:FY+4Rh1Q2rgLyv10aKJjhWApuKRCR/054XhreudfAvw=
gitlab.com/xx_network/ring v0.0.3-0.20210527191221-ce3f170aabd5/go.mod h1:aLzpP2TiZTQut/PVHR40EJAomzugDdHXetbieRClXIM= gitlab.com/xx_network/ring v0.0.3-0.20210527191221-ce3f170aabd5/go.mod h1:aLzpP2TiZTQut/PVHR40EJAomzugDdHXetbieRClXIM=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment