Skip to content
Snippets Groups Projects
Commit 44c17555 authored by Kamal Bramwell's avatar Kamal Bramwell
Browse files

Updated testnet ud contact and certificate

parent 04a5f718
Branches
No related tags found
No related merge requests found
......@@ -85,3 +85,7 @@ app/src/main/res/raw/ud_contact_test.bin
app/src/main/res/raw/ud_elixxir_io.crt
fastlane/Fastfile
app/src/main/res/raw/ud_testnet_contact.bin
app/src/main/res/raw/ud_testnet.crt
......@@ -131,23 +131,32 @@ class BindingsWrapperBindings {
private fun UserDiscoveryWrapperBindings.onUdInitialized() {
XxMessengerApplication.isUserDiscoveryRunning = true
development(BuildConfig.DEBUG || BuildConfig.ENVIRONMENT == Environment.TEST_NET)
when {
BuildConfig.ENVIRONMENT == Environment.TEST_NET -> testNet()
BuildConfig.DEBUG -> development()
else -> normal()
}
private fun UserDiscoveryWrapperBindings.development(enabled: Boolean) {
if (enabled) {
}
private fun UserDiscoveryWrapperBindings.development() {
setAlternativeUD(
if (BuildConfig.ENVIRONMENT == Environment.TEST_NET) {
testNetUserDiscoveryIp
} else {
devUserDiscoveryIp
} ,
devUserDiscoveryIp,
rawBytes(R.raw.ud_elixxir_io),
rawBytes(R.raw.ud_contact_test)
)
} else {
restoreNormalUD()
}
private fun UserDiscoveryWrapperBindings.testNet() {
setAlternativeUD(
testNetUserDiscoveryIp,
rawBytes(R.raw.ud_testnet),
rawBytes(R.raw.ud_testnet_contact)
)
}
private fun UserDiscoveryWrapperBindings.normal() {
restoreNormalUD()
}
private fun rawBytes(resourceId: Int): ByteArray {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment