feat: migrate nodeAliasCache to room
This commit is contained in:
@@ -5,10 +5,6 @@ object WalletConstants {
|
||||
// ── Unit conversion ───────────────────────────────────────────────────────
|
||||
const val MSAT_PER_SAT = 1_000L // millisatoshis per satoshi
|
||||
|
||||
// ── Polling ───────────────────────────────────────────────────────────────
|
||||
const val POLL_INTERVAL_MS = 3_000L // delay between payment status checks
|
||||
const val POLL_MAX_ATTEMPTS = 200 // 200 × 3s = 10 minutes max
|
||||
|
||||
// ── WebSocket reconnect ───────────────────────────────────────────────────
|
||||
const val WS_INITIAL_BACKOFF_MS = 1_000L // first retry delay
|
||||
const val WS_MAX_BACKOFF_MS = 16_000L // cap — never wait longer than this
|
||||
@@ -33,9 +29,7 @@ object WalletConstants {
|
||||
const val PAYMENTS_PAGE_SIZE = 20
|
||||
// ── Alias cache ───────────────────────────────────────────────────────────
|
||||
const val ALIAS_CACHE_TTL_MS = 3_600_000L // 1 hour — in-memory stale threshold
|
||||
const val ALIAS_PREFS_NAME = "alias_cache_prefs"
|
||||
const val ALIAS_PREFS_KEY = "alias_cache"
|
||||
const val ALIAS_PERSIST_TTL_MS = 86_400_000L // 24 hours — drop on load if older than this
|
||||
const val ALIAS_PERSIST_TTL_MS = 21 * 24 * 60 * 60 * 1000L // 21 days — drop on load if older than this
|
||||
// ── LNURL metadata cache ──────────────────────────────────────────────────
|
||||
const val LNURL_CACHE_TTL_MS = 7 * 24 * 60 * 60 * 1000L // 7 days
|
||||
// ── Payments cache ────────────────────────────────────────────────────────
|
||||
@@ -48,5 +42,4 @@ object WalletConstants {
|
||||
const val BALANCE_PREFS_KEY = "last_balance_sats"
|
||||
const val BALANCE_PREFS_SAVED_AT = "last_balance_saved_at"
|
||||
const val BALANCE_CACHE_TTL_MS = 3_600_000L // 1 hour
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user