Updated on 2026-08-14

This commit is contained in:
Tangem 2019-04-17 19:31:19 +03:00
parent 5dd2ef6776
commit 6fd870bc9a
8 changed files with 450 additions and 124 deletions

View file

@ -84,6 +84,18 @@ internal class NetworkModule {
return builder.build()
}
@Singleton
@Provides
@Named(Server.ApiSoChain.URL)
fun provideRetrofitSoChain(): Retrofit {
val builder = Retrofit.Builder()
.baseUrl(Server.ApiSoChain.URL)
.addConverterFactory(GsonConverterFactory.create())
if (BuildConfig.DEBUG)
builder.client(createOkHttpClient())
return builder.build()
}
private fun createOkHttpClient(): OkHttpClient {
return OkHttpClient.Builder().addInterceptor(createHttpLoggingInterceptor()).build()
}