From 0380927f7e31b5cbca394dc2df8505cf9840b641 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sun, 15 Mar 2026 11:05:40 -0400 Subject: [PATCH] fromJsonTo calls throw, they should always be wrapped if we want null results. --- .../vitorpamplona/quartz/nip47WalletConnect/NotificationTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip47WalletConnect/NotificationTest.kt b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip47WalletConnect/NotificationTest.kt index b06d3710ca..163d258416 100644 --- a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip47WalletConnect/NotificationTest.kt +++ b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip47WalletConnect/NotificationTest.kt @@ -91,7 +91,7 @@ class NotificationTest { @Test fun testUnknownNotificationTypeReturnsNull() { val json = """{"notification_type":"unknown_type","notification":{}}""" - val notification = OptimizedJsonMapper.fromJsonTo(json) + val notification = runCatching { OptimizedJsonMapper.fromJsonTo(json) }.getOrNull() assertNull(notification) } }