From d599f47e5cd09ccae917ad52591106c02f340e40 Mon Sep 17 00:00:00 2001 From: arvifox <arvifox@hotmail.com> Date: Wed, 30 Aug 2023 15:57:59 +0300 Subject: [PATCH] sn-2891 minor fixes --- build.gradle | 2 +- .../feature_polkaswap_impl/domain/SwapInteractorImpl.kt | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 1e9b03188..855404e7a 100644 --- a/build.gradle +++ b/build.gradle @@ -45,7 +45,7 @@ buildscript { composeCompiler : '1.4.6', composeConstraintLayout: '1.1.0-alpha05', uiCore : '0.1.0', - soraCard : '0.1.33', + soraCard : '0.1.34', lazySodium : '5.0.2', jna : '5.8.0', accompanist : '0.30.1', diff --git a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/domain/SwapInteractorImpl.kt b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/domain/SwapInteractorImpl.kt index 5963a8ff8..166cff79e 100644 --- a/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/domain/SwapInteractorImpl.kt +++ b/feature_polkaswap_impl/src/main/java/jp/co/soramitsu/feature_polkaswap_impl/domain/SwapInteractorImpl.kt @@ -160,9 +160,11 @@ class SwapInteractorImpl( private fun getFeeMode(ids: List<String>?): SwapFeeMode { if (ids == null) return SwapFeeMode.NON_SYNTHETIC - val withoutxst = ids.filter { it != SubstrateOptionsProvider.xstTokenId } - if (withoutxst.all { it.matches(syntheticRegex) }) return SwapFeeMode.SYNTHETIC - if (withoutxst.all { it.matches(syntheticRegex).not() }) return SwapFeeMode.NON_SYNTHETIC + if (ids.all { it.matches(syntheticRegex).not() }) return SwapFeeMode.NON_SYNTHETIC + if (ids.all { + it.matches(syntheticRegex) || it == SubstrateOptionsProvider.xstTokenId || it == SubstrateOptionsProvider.xstusdTokenId + } + ) return SwapFeeMode.SYNTHETIC return SwapFeeMode.BOTH }