Skip to content

Commit

Permalink
Merge pull request #185 from sora-xor/sn-2891
Browse files Browse the repository at this point in the history
sn-2891 minor fixes
  • Loading branch information
arvifox authored Aug 30, 2023
2 parents 310bfeb + d599f47 commit 2400659
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 2400659

Please sign in to comment.