Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.flipcash.app.core.AppRoute
import com.flipcash.app.core.ui.TokenCardStack
Expand Down Expand Up @@ -73,13 +74,14 @@ internal fun WalletScreenContent(
state = listState,
modifier = Modifier.fillMaxSize(),
contentPadding = PaddingValues(
top = CodeTheme.dimens.inset,
start = CodeTheme.dimens.inset,
end = CodeTheme.dimens.inset,
bottom = LocalTabBarPadding.current.calculateBottomPadding(),
bottom = LocalTabBarPadding.current.calculateBottomPadding() + CodeTheme.dimens.grid.x12,
)
) {
item {
Spacer(Modifier.height(CodeTheme.dimens.grid.x20))
Spacer(Modifier.height(CodeTheme.dimens.grid.x15))
}

item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,11 @@ class SelectTokenViewModel @Inject constructor(
)
}
.sortedWith(
compareByDescending<TokenWithLocalizedBalance> { it.balance.nativeAmount.rounded() }
.thenBy { it.token.address.base58() }
// Match iOS (Session.balances): descending by exact value, then
// alphabetical by name (not by mint address, which reordered equal-value
// tokens like LaunchIt/Teddies differently than iOS).
compareByDescending<TokenWithLocalizedBalance> { it.balance.nativeAmount }
.thenBy { it.token.name }
)
.filter {
val hasBalance = it.balance.nativeAmount.hasDisplayableValue
Expand Down
Loading