From 60eebd4ba64aa553bcd86a44296cb88110d6b2d1 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 24 May 2022 20:18:22 +0300 Subject: [PATCH] Updated on 2026-08-14 --- app/build.gradle | 2 +- domain/build.gradle | 2 +- .../features/addCustomToken/redux/AddCustomTokenState.kt | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 81cc173cf9..446c060d9f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -93,7 +93,7 @@ dependencies { implementation 'com.google.android.play:core-ktx:1.8.1' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' - implementation 'com.tangem:blockchain:develop-82' + implementation 'com.tangem:blockchain:develop-83' // implementation 'com.tangem:blockchain:0.0.1' implementation 'com.tangem.tangem-sdk-kotlin:core:develop-142' implementation 'com.tangem.tangem-sdk-kotlin:android:develop-142' diff --git a/domain/build.gradle b/domain/build.gradle index ba2db1a441..bb6f9ae760 100644 --- a/domain/build.gradle +++ b/domain/build.gradle @@ -59,7 +59,7 @@ dependencies { implementation implementation(project(path: ':network')) implementation implementation(project(path: ':common')) - implementation 'com.tangem:blockchain:develop-82' + implementation 'com.tangem:blockchain:develop-83' // implementation 'com.tangem:blockchain:0.0.1' implementation 'com.tangem.tangem-sdk-kotlin:core:develop-142' implementation 'com.tangem.tangem-sdk-kotlin:android:develop-142' diff --git a/domain/src/main/java/com/tangem/domain/features/addCustomToken/redux/AddCustomTokenState.kt b/domain/src/main/java/com/tangem/domain/features/addCustomToken/redux/AddCustomTokenState.kt index af7bed54ea..7f958eaa58 100644 --- a/domain/src/main/java/com/tangem/domain/features/addCustomToken/redux/AddCustomTokenState.kt +++ b/domain/src/main/java/com/tangem/domain/features/addCustomToken/redux/AddCustomTokenState.kt @@ -191,7 +191,7 @@ data class AddCustomTokenState( val default = Blockchain.Unknown typedNetworksList.add(0, default) - return typedNetworksList + return typedNetworksList.sortByName() } private fun createFormValidators(): Map> { @@ -208,7 +208,7 @@ data class AddCustomTokenState( val evmBlockchains = Blockchain.values().filter { card.isTestCard == it.isTestnet() && it.isEvm() } - return listOf(Blockchain.Unknown) + evmBlockchains + return (listOf(Blockchain.Unknown) + evmBlockchains).sortByName() } private fun createInitialScreenState(): ScreenState { @@ -277,6 +277,8 @@ data class AddCustomTokenState( } } +private fun List.sortByName(): List = this.sortedBy { it.fullName } + enum class CustomTokenType { Token, Blockchain } \ No newline at end of file