Updated on 2026-08-14

This commit is contained in:
Tangem 2024-12-31 14:44:40 +03:00
parent 8e1763dee2
commit 504a49949a
33 changed files with 408 additions and 25 deletions

View file

@ -49,6 +49,9 @@ interface TangemTechApi {
@Body userTokens: UserTokensResponse,
): ApiResponse<Unit>
@POST("user-tokens")
suspend fun markUserWallerWasCreated(@Body body: MarkUserWalletWasCreatedBody): ApiResponse<Unit>
/** Returns referral status by [walletId] */
@GET("referral/{walletId}")
suspend fun getReferralStatus(@Path("walletId") walletId: String): ReferralResponse
@ -108,6 +111,17 @@ interface TangemTechApi {
@GET("networks/providers")
suspend fun getBlockchainProviders(): Map<String, List<ProviderModel>>
@GET("seedphrase-notification/{wallet_id}")
suspend fun getSeedPhraseNotificationStatus(
@Path("wallet_id") walletId: String,
): ApiResponse<SeedPhraseNotificationDTO>
@PUT("seedphrase-notification/{wallet_id}")
suspend fun updateSeedPhraseNotificationStatus(
@Path("wallet_id") walletId: String,
@Body body: SeedPhraseNotificationDTO,
): ApiResponse<Unit>
companion object {
val marketsQuoteFields = listOf(
"price",

View file

@ -0,0 +1,9 @@
package com.tangem.datasource.api.tangemTech.models
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class MarkUserWalletWasCreatedBody(
@Json(name = "user_wallet_id") val userWalletId: String,
)

View file

@ -0,0 +1,24 @@
package com.tangem.datasource.api.tangemTech.models
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class SeedPhraseNotificationDTO(val status: Status) {
enum class Status {
@Json(name = "notneeded")
NOT_NEEDED,
@Json(name = "notified")
NOTIFIED,
@Json(name = "declined")
DECLINED,
@Json(name = "confirmed")
CONFIRMED,
;
}
}

View file

@ -59,6 +59,9 @@ class AppLogsStore @Inject constructor(
/** Save log [message] */
fun saveLogMessage(message: String) {
// Temporally logs are not saved
return
launchWithLock {
createFileIfNotExist()
@ -68,6 +71,9 @@ class AppLogsStore @Inject constructor(
/** Save log that consists from [messages] */
fun saveLogMessage(vararg messages: String) {
// Temporally logs are not saved
return
launchWithLock {
createFileIfNotExist()