@@ -41,7 +41,7 @@ import to.bitkit.repositories.ActivityRepo
4141import to.bitkit.repositories.BlocktankRepo
4242import to.bitkit.repositories.LightningRepo
4343import to.bitkit.services.NodeEventHandler
44- import to.bitkit.services.NodeServiceState
44+ import to.bitkit.services.NodeServiceFgState
4545import to.bitkit.test.BaseUnitTest
4646import kotlin.test.assertEquals
4747import kotlin.test.assertNotNull
@@ -57,7 +57,7 @@ class WakeNodeWorkerTest : BaseUnitTest() {
5757 private val activityRepo = mock<ActivityRepo >()
5858 private val cacheStore = mock<CacheStore >()
5959 private val receivedNotificationContent = mock<ReceivedNotificationContent >()
60- private val nodeServiceState = NodeServiceState ()
60+ private val nodeServiceFgState = NodeServiceFgState ()
6161
6262 private val channelId = " channel-1"
6363 private val receivedTitle by lazy { context.getString(R .string.notification__received__title) }
@@ -71,7 +71,7 @@ class WakeNodeWorkerTest : BaseUnitTest() {
7171 val app = context as Application
7272 Shadows .shadowOf(app).grantPermissions(Manifest .permission.POST_NOTIFICATIONS )
7373
74- // Default: app killed (no foreground activity); nodeServiceState defaults to not-running
74+ // Default: app killed (no foreground activity); nodeServiceFgState defaults to not-running
7575 App .currentActivity = CurrentActivity ()
7676 }
7777
@@ -113,7 +113,7 @@ class WakeNodeWorkerTest : BaseUnitTest() {
113113
114114 @Test
115115 fun `cjit channel ready skips notification when foreground service is running` () = test {
116- nodeServiceState .setForegroundServiceRunning(true )
116+ nodeServiceFgState .setForegroundServiceRunning(true )
117117 val channel = cjitChannel(sats = 48_064 )
118118 stubChannel(channel, cjitEntry = IcJitEntry .mock())
119119 stubStartFiring(channelReadyEvent())
@@ -178,7 +178,7 @@ class WakeNodeWorkerTest : BaseUnitTest() {
178178
179179 @Test
180180 fun `payment received skips notification when foreground service is running` () = test {
181- nodeServiceState .setForegroundServiceRunning(true )
181+ nodeServiceFgState .setForegroundServiceRunning(true )
182182 whenever(workerParams.inputData).thenReturn(
183183 workDataOf(" type" to BlocktankNotificationType .incomingHtlc.name),
184184 )
@@ -204,7 +204,7 @@ class WakeNodeWorkerTest : BaseUnitTest() {
204204 activityRepo = activityRepo,
205205 cacheStore = cacheStore,
206206 receivedNotificationContent = receivedNotificationContent,
207- nodeServiceState = nodeServiceState ,
207+ nodeServiceFgState = nodeServiceFgState ,
208208 )
209209
210210 private fun channelReadyEvent () = mock<Event .ChannelReady > {
0 commit comments