We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32179a1 commit d639854Copy full SHA for d639854
processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt
@@ -82,7 +82,12 @@ private fun createOutputFiles() {
82
.forEach { iconLocation ->
83
84
val jsonData = Klaxon().parseJsonArray(iconLocation.reader())
85
- val iconName = iconLocation.toString().replace("../_data/icons/", "").replace(".json", "")
+
86
+ if (iconLocation.extension != "json") {
87
+ error("Icon must be json " + iconLocation)
88
+ }
89
90
+ val iconName = iconLocation.toString().removePrefix("../_data/icons/").removeSuffix(".json")
91
92
val iconJson = JsonObject()
93
iconJson["name"] = iconName
0 commit comments