Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-19 14:22:53 +03:00
parent 4ad958be89
commit e0fb0e3587
7 changed files with 118 additions and 3 deletions

View file

@ -172,4 +172,13 @@ interface TangemTechApi {
@Header("Cache-Control") cacheControl: String = "max-age=600",
): ApiResponse<PromoBannerResponse>
// endregion
/**
* Stores transaction hash in cache to prevent duplicate push
* notifications for yield operations (deposit, withdraw, send).
* Used when yield operations generate intermediate transactions
* that should not trigger notifications.
*/
@POST("v1/transaction-events")
suspend fun transactionEvents(@Body name: TransactionEventBody): ApiResponse<Unit>
}

View file

@ -0,0 +1,23 @@
package com.tangem.datasource.api.tangemTech.models
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class TransactionEventBody(
@Json(name = "transactionId") val transactionId: String,
@Json(name = "operationType") val operationType: OperationType,
)
@JsonClass(generateAdapter = false)
enum class OperationType {
@Json(name = "YIELD_DEPOSIT")
YIELD_DEPOSIT,
@Json(name = "YIELD_WITHDRAW")
YIELD_WITHDRAW,
@Json(name = "YIELD_SEND")
YIELD_SEND,
}