fix: r8 broke workmanager
This commit is contained in:
@@ -19,5 +19,6 @@ object JsonProvider {
|
||||
ignoreUnknownKeys = true // tolerate extra fields from the API
|
||||
isLenient = true // accept unquoted/malformed JSON from some endpoints
|
||||
explicitNulls = false // omit null fields when serializing requests
|
||||
encodeDefaults = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,42 +340,43 @@ data class FiatRateResponse(
|
||||
// ── History sync ──────────────────────────────────────────────────────────────
|
||||
@Serializable
|
||||
data class PaginatedPaymentsResponse(
|
||||
@SerialName("data") val data: List<PaymentRecord>,
|
||||
@SerialName("total") val total: Int
|
||||
@SerialName("data") val data: List<PaymentRecord> = emptyList(),
|
||||
@SerialName("total") val total: Int = 0
|
||||
)
|
||||
|
||||
// ── NWC Provider models ───────────────────────────────────────────────────────
|
||||
@Serializable
|
||||
data class NwcKey(
|
||||
val pubkey: String,
|
||||
val wallet: String,
|
||||
val description: String,
|
||||
val expires_at: Long,
|
||||
val permissions: String,
|
||||
val created_at: Long,
|
||||
val last_used: Long
|
||||
val pubkey: String = "",
|
||||
val wallet: String = "",
|
||||
val description: String = "",
|
||||
val expires_at: Long = 0L,
|
||||
val permissions: String = "",
|
||||
val created_at: Long = 0L,
|
||||
val last_used: Long = 0L
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class NwcBudget(
|
||||
val id: Int,
|
||||
val pubkey: String,
|
||||
val budget_msats: Long,
|
||||
val refresh_window: Int, // seconds
|
||||
val created_at: Long,
|
||||
val used_budget_msats: Long = 0
|
||||
val id: Int = 0,
|
||||
val pubkey: String = "",
|
||||
val budget_msats: Long = 0L,
|
||||
val refresh_window: Int = 0,
|
||||
val created_at: Long = 0L,
|
||||
val used_budget_msats: Long = 0L
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class NwcGetResponse(
|
||||
val data: NwcKey,
|
||||
val budgets: List<NwcBudget>
|
||||
val data: NwcKey = NwcKey(),
|
||||
val budgets: List<NwcBudget> = emptyList()
|
||||
)
|
||||
|
||||
// Request models — no defaults needed (you control the fields, never deserializing)
|
||||
@Serializable
|
||||
data class NwcNewBudget(
|
||||
val budget_msats: Long,
|
||||
val refresh_window: Int, // seconds
|
||||
val refresh_window: Int,
|
||||
val created_at: Long = System.currentTimeMillis() / 1000L
|
||||
)
|
||||
|
||||
@@ -383,7 +384,7 @@ data class NwcNewBudget(
|
||||
data class NwcRegistrationRequest(
|
||||
val permissions: List<String>,
|
||||
val description: String,
|
||||
val expires_at: Long, // unix timestamp; 0 = no expiry
|
||||
val expires_at: Long,
|
||||
val budgets: List<NwcNewBudget> = emptyList()
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user