From a6e9439c6d87c7af647ea2ebf599ac44dbb40529 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 9 Jun 2026 20:45:17 +0000 Subject: [PATCH] fix: use multiplatform hex padding in room state tests String.format is JVM-only and broke the iOS Klib compile of commonTest. Replace "%064x".format(...) with toString(16).padStart(64, '0'). --- .../amethyst/commons/viewmodels/RoomReactionsStateTest.kt | 2 +- .../amethyst/commons/viewmodels/RoomZapsStateTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/viewmodels/RoomReactionsStateTest.kt b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/viewmodels/RoomReactionsStateTest.kt index 7a894efa85..684d38356a 100644 --- a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/viewmodels/RoomReactionsStateTest.kt +++ b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/viewmodels/RoomReactionsStateTest.kt @@ -37,7 +37,7 @@ class RoomReactionsStateTest { to: String?, content: String, createdAt: Long, - id: String = "%064x".format(nextEventId++), + id: String = (nextEventId++).toString(16).padStart(64, '0'), ): ReactionEvent { val tags = buildList> { diff --git a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/viewmodels/RoomZapsStateTest.kt b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/viewmodels/RoomZapsStateTest.kt index eea3ffcd04..bc67bc0981 100644 --- a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/viewmodels/RoomZapsStateTest.kt +++ b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/viewmodels/RoomZapsStateTest.kt @@ -45,7 +45,7 @@ class RoomZapsStateTest { from: String, to: String?, createdAt: Long, - id: String = "%064x".format(nextEventId++), + id: String = (nextEventId++).toString(16).padStart(64, '0'), ): LnZapEvent { val tags = buildList> {