feat: add history sync worker

This commit is contained in:
2026-06-07 17:16:47 +02:00
parent 3f25ee4c41
commit 3b14f2fba9
25 changed files with 807 additions and 120 deletions
@@ -1,6 +1,7 @@
package com.bitcointxoko.gudariwallet.api
import com.google.gson.TypeAdapter
import com.google.gson.annotations.JsonAdapter
import com.google.gson.annotations.SerializedName
import com.google.gson.stream.JsonReader
import com.google.gson.stream.JsonToken
@@ -205,7 +206,8 @@ data class PaymentRecord(
data class PaymentExtra(
@SerializedName("tag") val tag: String?,
@SerializedName("comment") val comment: String?,
@JsonAdapter(FlexibleStringAdapter::class)
val comment: String?,
@SerializedName("success_action") val successAction: SuccessAction?,
@SerializedName("wallet_id") val walletId: String?,
@SerializedName("destination") val destination: String?,
@@ -308,4 +310,10 @@ data class WsPayment(
data class FiatRateResponse(
val rate: Double, // sat to fiat rate
val price : Double // BTC price in the requested fiat currency
)
)
// ── History sync ─────────────────────────────────────────────────────────────
data class PaginatedPaymentsResponse(
@SerializedName("data") val data: List<PaymentRecord>,
@SerializedName("total") val total: Int
)