Skip to content

Commit 56a7e0a

Browse files
committed
fixed klint issues
1 parent 4e9dd3e commit 56a7e0a

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

thepeer-android/src/main/java/co/thepeer/sdk/ui/activity/ThepeerSdkActivity.kt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ import co.thepeer.sdk.R
1616
import co.thepeer.sdk.databinding.SdkActivityBinding
1717
import co.thepeer.sdk.model.ThepeerParam
1818
import co.thepeer.sdk.model.ThepeerResult
19-
import co.thepeer.sdk.utils.*
2019
import co.thepeer.sdk.utils.Logger
20+
import co.thepeer.sdk.utils.ThepeerConstants
2121
import co.thepeer.sdk.utils.Urls
2222
import co.thepeer.sdk.utils.WebInterface
23+
import co.thepeer.sdk.utils.isNetworkConnectionAvailable
2324

2425
internal class ThepeerSdkActivity : AppCompatActivity() {
2526
private var params: ThepeerParam? = null
@@ -45,7 +46,6 @@ internal class ThepeerSdkActivity : AppCompatActivity() {
4546
throw IllegalStateException("Params should not be null. Initialize thePeer using this function Thepeer.Builder(...)")
4647
}
4748

48-
4949
params?.let {
5050
url = Urls.createTransactionUrl(it)
5151
showWebView()
@@ -90,10 +90,8 @@ internal class ThepeerSdkActivity : AppCompatActivity() {
9090
startActivity(Intent(Intent.ACTION_VIEW, request?.url))
9191
return true
9292
}
93-
9493
}
9594

96-
9795
binding.webViewPeer.addJavascriptInterface(
9896
WebInterface { results ->
9997
redirectWithResult(results)
@@ -125,7 +123,6 @@ internal class ThepeerSdkActivity : AppCompatActivity() {
125123
Toast.makeText(this, getString(R.string.retry_text), Toast.LENGTH_LONG)
126124
.show()
127125
}
128-
129126
} else {
130127
Toast.makeText(this, "Something went wrong. Contact thePeer support", Toast.LENGTH_LONG)
131128
.show()
@@ -139,7 +136,7 @@ internal class ThepeerSdkActivity : AppCompatActivity() {
139136
}
140137
}
141138

142-
private fun hideRetryView(){
139+
private fun hideRetryView() {
143140
binding.includeRetryView.retryView.isVisible = false
144141
binding.loading.isVisible = true
145142
}
@@ -169,10 +166,9 @@ internal class ThepeerSdkActivity : AppCompatActivity() {
169166
object : OnBackPressedCallback(true) {
170167
override fun handleOnBackPressed() {
171168
params = null
172-
if(!isNetworkConnectionAvailable){
169+
if (!isNetworkConnectionAvailable) {
173170
finish()
174171
}
175172
}
176173
}
177-
178174
}

thepeer-android/src/main/java/co/thepeer/sdk/utils/Urls.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import com.google.gson.Gson
66
internal object Urls {
77

88
fun createTransactionUrl(data: ThepeerParam): String {
9-
var BASE_URL = "https://groot.thepeer.co?"
9+
var BASE_URL = "https://groot.thepeer.co?"
1010

1111
val params = mapOf(
1212
"publicKey" to data.publicKey,

0 commit comments

Comments
 (0)