diff --git a/.github/workflows/ktlint.yml b/.github/workflows/ktlint.yml index 31fc19f..aa4e492 100644 --- a/.github/workflows/ktlint.yml +++ b/.github/workflows/ktlint.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'zulu' - java-version: '17' + java-version: '21' - run: | curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.2.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/ - name: run ktlint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b4edb9..2d0423b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,6 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'zulu' - java-version: '17' + java-version: '21' - name: run tests run: ./gradlew test -PisGithubActions \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 55bcc3c..a32873d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,7 +18,7 @@ if (!project.hasProperty("isGithubActions")) { } group = "io.newm" -version = "2.1.0-SNAPSHOT" +version = "2.2.0-SNAPSHOT" java.sourceCompatibility = JavaVersion.VERSION_21 java.targetCompatibility = JavaVersion.VERSION_21 diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 48e925a..eeb15f7 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -1,5 +1,5 @@ object Versions { - const val COMMONS_LOGGING = "1.3.0" + const val COMMONS_LOGGING = "1.3.1" const val COMMONS_NUMBERS = "1.1" const val COROUTINES = "1.8.0" const val GOOGLE_TRUTH = "1.4.2" diff --git a/src/main/kotlin/io/newm/kogmios/protocols/model/serializers/UtxoOutputValueSerializer.kt b/src/main/kotlin/io/newm/kogmios/protocols/model/serializers/UtxoOutputValueSerializer.kt index 4e4d007..ab17cb9 100644 --- a/src/main/kotlin/io/newm/kogmios/protocols/model/serializers/UtxoOutputValueSerializer.kt +++ b/src/main/kotlin/io/newm/kogmios/protocols/model/serializers/UtxoOutputValueSerializer.kt @@ -26,12 +26,15 @@ object UtxoOutputValueSerializer : KSerializer { val adaMap = elements["ada"] ?: throw IllegalStateException("ada value not found in UtxoOutputValue") val lovelace = adaMap["lovelace"] ?: throw IllegalStateException("lovelace value not found in UtxoOutputValue") val assets = - elements.entries.filterNot { it.key == "ada" }.map { - Asset( - policyId = it.key, - name = it.value.keys.first(), - quantity = it.value.values.first() - ) + elements.entries.filterNot { it.key == "ada" }.flatMap { policy -> + val policyId = policy.key + policy.value.map { + Asset( + policyId = policyId, + name = it.key, + quantity = it.value + ) + } } return UtxoOutputValue( ada = Ada(Lovelace(lovelace)),