Skip to content

Commit 49de3c0

Browse files
authored
Properly filter the chains before getting the default chain ID (#783)
1 parent cd88845 commit 49de3c0

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ allprojects {
5252
}
5353

5454
group = "exchange.dydx.abacus"
55-
version = "1.13.56"
55+
version = "1.13.57"
5656

5757
repositories {
5858
google()

src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipProcessor.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ internal class SkipProcessor(
198198
}
199199

200200
override fun defaultChainId(): String? {
201-
val selectedChain = getChainById(chainId = ETHEREUM_CHAIN_ID) ?: parser.asNativeMap(this.chains?.firstOrNull())
201+
val firstChain = this.chains?.firstOrNull { parser.asString(parser.asNativeMap(it)?.get("chain_type")) == selectedChainType?.rawValue }
202+
val selectedChain = getChainById(chainId = ETHEREUM_CHAIN_ID) ?: parser.asNativeMap(firstChain)
202203

203204
return parser.asString(selectedChain?.get("chain_id"))
204205
}

v4_abacus.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'v4_abacus'
3-
spec.version = '1.13.56'
3+
spec.version = '1.13.57'
44
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
55
spec.source = { :http=> ''}
66
spec.authors = ''

0 commit comments

Comments
 (0)