diff --git a/src/main/kotlin/org/ethereum/lists/tokens/CorrectDecimals.kt b/src/main/kotlin/org/ethereum/lists/tokens/CorrectDecimals.kt index 86cedfa7e..c1c5eb66d 100644 --- a/src/main/kotlin/org/ethereum/lists/tokens/CorrectDecimals.kt +++ b/src/main/kotlin/org/ethereum/lists/tokens/CorrectDecimals.kt @@ -6,15 +6,15 @@ fun main() { allNetworksTokenDir.listFiles().forEach { singleNetworkTokenDirectory -> singleNetworkTokenDirectory.listFiles().forEach { - val jsonObject =it.reader().use { reader -> + val jsonObject = it.reader().use { reader -> Klaxon().parseJsonObject(reader) } val decimals = jsonObject["decimals"] if (decimals is String) { println("got string decimal - rewrite") - jsonObject["decimals"] = Integer.parseInt( decimals ) + jsonObject["decimals"] = Integer.parseInt(decimals) + it.writeText(jsonObject.toJsonString(true)) } - it.writeText(jsonObject.toJsonString(true)) } } }