Skip to content

Commit 06ebba8

Browse files
committed
chore: improve token error log
1 parent 0401694 commit 06ebba8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/to/bitkit/repositories/LightningRepo.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ class LightningRepo @Inject constructor(
869869
val token = token ?: firebaseMessaging.token.await()
870870
val cachedToken = keychain.loadString(Keychain.Key.PUSH_NOTIFICATION_TOKEN.name)
871871

872-
requireNotNull(token.takeIf { it.isNotEmpty() })
872+
require(token.isNotEmpty()) { "FCM token is empty or null" }
873873

874874
if (cachedToken == token) {
875875
Logger.debug("Skipped registering for notifications, current device token already registered")

0 commit comments

Comments
 (0)