mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
Fun to filter EIP3091 explorers
This commit is contained in:
parent
e07d0bd635
commit
b5997f796c
|
@ -16,4 +16,6 @@ data class Chain(
|
|||
val explorers: List<Explorer>?,
|
||||
val infoURL: String,
|
||||
val title: String?
|
||||
)
|
||||
)
|
||||
|
||||
fun List<Chain>.filterEIP3019Explorers() = map { it.copy(explorers = it.explorers?.filterEIP3019()) }
|
|
@ -1,6 +1,7 @@
|
|||
package org.ethereum.lists.chains.model
|
||||
|
||||
import com.squareup.moshi.JsonClass
|
||||
import org.ethereum.lists.chains.model.ExplorerStandard.*
|
||||
|
||||
enum class ExplorerStandard {
|
||||
EIP3091,
|
||||
|
@ -12,4 +13,6 @@ data class Explorer(
|
|||
val name: String,
|
||||
val url: String,
|
||||
val standard: ExplorerStandard
|
||||
)
|
||||
)
|
||||
|
||||
fun List<Explorer>.filterEIP3019() = filter { it.standard == EIP3091 }
|
Loading…
Reference in New Issue
Block a user