Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter unsupported nodes by default #446

Merged
merged 2 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ android {
buildConfigField "String", "BUGFENDER_KEY", "\"76DAzZtiLE5AYx7uvIWD8I16EqgReOHc\""
buildConfigField "String", "INTERCOM_API_KEY", "\"android_sdk-e480f3fce4f2572742b13c282c453171c1715516\""
buildConfigField "String", "INTERCOM_APP_ID", "\"h7hlm9on\""
buildConfigField "String", "NODE_VERSION", "\"0.52.0-1branch-testnet3-b-1\""
buildConfigField "String", "NODE_VERSION", "\"0.61.0\""

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -227,10 +227,12 @@ dependencies {

//Mysterium
implementation "network.mysterium:terms:0.0.32"
implementation "network.mysterium:mobile-node:0.52.0-1branch-testnet3-b-1"
implementation "network.mysterium:mobile-node:0.61.0"
// Change NODE_VERSION in defaultConfig if updating version of mobile-node
// Comment network.mysterium:mobile-node and replace with your local path to use local node build.
//implementation files('/Users/macbook/AndroidStudioProjects/Mysterium.aar')
// implementation files('/Users/soffokl/go/src/github.com/mysteriumnetwork/node/build/package/Mysterium.aar')


testImplementation 'junit:junit:4.12'
androidTestImplementation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class FilterUseCase(
companion object {
const val ALL_NODES_FILTER_ID = 0
private const val SERVICE_TYPE = "wireguard"
private const val NAT_COMPATIBILITY = "auto"
private val selectedResources = listOf(
R.drawable.all_filters_selected,
R.drawable.media_filters_selected,
Expand Down Expand Up @@ -69,6 +70,7 @@ class FilterUseCase(
presetID = filterId.toLong()
refresh = true
serviceType = SERVICE_TYPE
natCompatibility = "auto"
}
nodeRepository.getProposalsByFilterId(proposalRequest).map {
NodeEntity(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class NodesUseCase(
companion object {
const val ALL_COUNTRY_CODE = "ALL_COUNTRY"
private const val SERVICE_TYPE = "wireguard"
private const val NAT_COMPATIBILITY = "auto"
}

fun initDeferredNode(deferredNode: DeferredNode) {
Expand Down Expand Up @@ -84,6 +85,7 @@ class NodesUseCase(
val proposalsRequest = GetProposalsRequest().apply {
this.refresh = true
serviceType = SERVICE_TYPE
natCompatibility = NAT_COMPATIBILITY
}
return nodeRepository.proposals(proposalsRequest)
.map { NodeEntity(it) }
Expand Down