remove unused singleton companion object from NamecoinNameService
The companion object (instance, getInstance, init) was dead code — nothing outside the class referenced it. Koin handles instantiation via AppModules.
This commit is contained in:
-16
@@ -55,22 +55,6 @@ class NamecoinNameService(
|
||||
)
|
||||
private val cache = NamecoinLookupCache()
|
||||
|
||||
companion object {
|
||||
@Volatile
|
||||
private var instance: NamecoinNameService? = null
|
||||
|
||||
fun getInstance(): NamecoinNameService =
|
||||
instance ?: throw IllegalStateException(
|
||||
"NamecoinNameService not initialized. Call init() first.",
|
||||
)
|
||||
|
||||
fun init(electrumxClient: ElectrumXClient): NamecoinNameService =
|
||||
synchronized(this) {
|
||||
instance?.let { return it }
|
||||
NamecoinNameService(electrumxClient).also { instance = it }
|
||||
}
|
||||
}
|
||||
|
||||
// ── Public API ─────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user