Updated on 2026-08-14
This commit is contained in:
parent
caf5b6fae7
commit
f2dfe2f8bc
21 changed files with 326 additions and 6 deletions
|
|
@ -42,6 +42,7 @@ dependencies {
|
|||
implementation(projects.domain.tokens.models)
|
||||
implementation(projects.domain.wallets)
|
||||
implementation(projects.domain.wallets.models)
|
||||
implementation(projects.domain.settings)
|
||||
|
||||
/** DI */
|
||||
implementation(deps.hilt.android)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import kotlinx.collections.immutable.toImmutableList
|
|||
import kotlinx.coroutines.flow.*
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
import java.math.BigDecimal
|
||||
import javax.inject.Inject
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
|
|
@ -122,7 +123,9 @@ internal class SelectProviderModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun List<OnrampProviderWithQuote>.toProvidersListItems() = mapIndexed { index, quote ->
|
||||
private fun List<OnrampProviderWithQuote>.toProvidersListItems() = sortedByDescending {
|
||||
(it as? OnrampProviderWithQuote.Data)?.toAmount?.value ?: BigDecimal.ZERO
|
||||
}.mapIndexed { index, quote ->
|
||||
when (quote) {
|
||||
is OnrampProviderWithQuote.Data -> {
|
||||
val rate = quote.toAmount.value.format {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue