Updated on 2026-08-14
This commit is contained in:
parent
25e76dbb18
commit
5e91f8ffa6
14 changed files with 408 additions and 3 deletions
|
|
@ -17,6 +17,9 @@ interface NetworkComponent {
|
|||
@get:Named(Server.ApiInfura.URL_INFURA)
|
||||
val retrofitInfura: Retrofit
|
||||
|
||||
@get:Named(Server.ApiMaticTesnet.URL_MATIC_TESTNET)
|
||||
val retrofitMaticTesnet: Retrofit
|
||||
|
||||
@get:Named(Server.ApiEstimatefee.URL_ESTIMATEFEE)
|
||||
val retrofitEstimatefee: Retrofit
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,18 @@ internal class NetworkModule {
|
|||
return builder.build()
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
@Named(Server.ApiMaticTesnet.URL_MATIC_TESTNET)
|
||||
fun provideRetrofitMaticTestnet(): Retrofit {
|
||||
val builder = Retrofit.Builder()
|
||||
.baseUrl(Server.ApiMaticTesnet.URL_MATIC_TESTNET)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
if (BuildConfig.DEBUG)
|
||||
builder.client(createOkHttpClient())
|
||||
return builder.build()
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
@Named(Server.ApiEstimatefee.URL_ESTIMATEFEE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue