Updated on 2026-08-14

This commit is contained in:
Tangem 2022-12-09 10:28:08 +03:00
parent 2413e9a3b7
commit 6fb8e4e2ea
197 changed files with 39 additions and 75 deletions

View file

@ -7,7 +7,7 @@ import okhttp3.Response
[REDACTED_AUTHOR]
*/
open class AddHeaderInterceptor(
private val headers: Map<String, String>
private val headers: Map<String, String>,
) : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
@ -21,10 +21,10 @@ open class AddHeaderInterceptor(
}
}
class CacheControlHttpInterceptor(maxAgeSeconds: Int) : AddHeaderInterceptor(mapOf(
"Cache-Control" to "max-age=$maxAgeSeconds",
))
class CacheControlHttpInterceptor(maxAgeSeconds: Int) : AddHeaderInterceptor(
mapOf("Cache-Control" to "max-age=$maxAgeSeconds"),
)
class CardPublicKeyHttpInterceptor(cardPublicKeyHex: String) : AddHeaderInterceptor(mapOf(
"card_public_key" to cardPublicKeyHex,
))
class CardPublicKeyHttpInterceptor(cardPublicKeyHex: String) : AddHeaderInterceptor(
mapOf("card_public_key" to cardPublicKeyHex),
)

View file

@ -1,19 +0,0 @@
package com.tangem.datasource.api.common
/**
[REDACTED_AUTHOR]
*/
// sealed interface NetworkModuleMessage : ModuleMessage
//
// sealed class NetworkError(
// subCode: Int,
// override val message: String,
// override val data: Any?,
// ) : NetworkModuleMessage, ModuleError() {
// override val code: Int = ModuleErrorCode.NETWORK + subCode
//
// companion object {
// // base code used for all error in the module
// // const val CODE_ANY_OTHER = 100..199, 200..299
// }
// }