Updated on 2026-08-14
This commit is contained in:
parent
4407663b8b
commit
9cd92c0def
2 changed files with 3 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ data class TangemPayTxHistoryResponse(
|
|||
@Json(name = "status") val status: String,
|
||||
@Json(name = "declined_reason") val declinedReason: String? = null,
|
||||
@Json(name = "authorized_at") val authorizedAt: DateTime,
|
||||
@Json(name = "posted_at") val postedAt: DateTime,
|
||||
@Json(name = "posted_at") val postedAt: DateTime?,
|
||||
)
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ internal object TangemPayTxHistoryItemConverter :
|
|||
private fun convertSpend(id: String, spend: TangemPayTxHistoryResponse.Spend): TangemPayTxHistoryItem.Spend {
|
||||
return TangemPayTxHistoryItem.Spend(
|
||||
id = id,
|
||||
date = spend.postedAt,
|
||||
// If postedAt is null, it means transaction wasn't posted and was likely declined. Use authorizedAt
|
||||
date = spend.postedAt ?: spend.authorizedAt,
|
||||
amount = spend.amount,
|
||||
currency = Currency.getInstance(spend.currency),
|
||||
enrichedMerchantName = spend.enrichedMerchantName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue