Skip to content

Commit

Permalink
Merge pull request #544 from mysteriumnetwork/bugfix/smart_connect_so…
Browse files Browse the repository at this point in the history
…rt_type

Added sort type for smart connect request
  • Loading branch information
IrynaTsymbaliukGeniusee authored Mar 18, 2022
2 parents 69c7e68 + 41cb2d1 commit 9cdbe8f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ConnectionViewModel(useCaseProvider: UseCaseProvider) : ViewModel() {
const val DEFAULT_DNS_OPTION = "auto"
const val TAG = "HomeViewModel"
const val SESSION_NUMBER_BEFORE_REVIEW = 3
const val SORT_BY_TYPE = "quality"
}

val successConnectEvent: LiveData<Proposal>
Expand Down Expand Up @@ -115,13 +116,14 @@ class ConnectionViewModel(useCaseProvider: UseCaseProvider) : ViewModel() {
disconnectIfConnectedNode()
val code =
if (countryCode == ALL_COUNTRY_CODE || countryCode == null) {
""
String()
} else {
countryCode.toUpperCase(Locale.ROOT)
}
val req = ConnectRequest().apply {
identityAddress = identity?.address ?: ""
this.countryCode = code
sortBy = SORT_BY_TYPE
providers = String()
dnsOption = settingsUseCase.getSavedDns() ?: DEFAULT_DNS_OPTION
}
Expand Down

0 comments on commit 9cdbe8f

Please sign in to comment.