Skip to content

Commit fdf9eb7

Browse files
authored
close #106: fix balance parser (#107)
1 parent de7aacc commit fdf9eb7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • Api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/port/api/binance/util

Api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/port/api/binance/util/BalanceParser.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ object BalanceParser {
1111

1212
for (w in list) {
1313
result.addOrGet(w.asset).apply {
14-
if (w.type == "exchange")
15-
locked = w.balance
16-
else
17-
free = w.balance
14+
when (w.type) {
15+
"exchange" -> locked = w.balance
16+
"main" -> free = w.balance
17+
}
1818
}
1919
}
2020
return result

0 commit comments

Comments
 (0)