Updated on 2026-08-14

This commit is contained in:
Tangem 2023-04-07 20:39:24 +08:00
parent 069605e151
commit 36516c900f
234 changed files with 902 additions and 1618 deletions

View file

@ -290,11 +290,7 @@ internal class StateBuilder(val actions: UiActions) {
)
}
fun createErrorTransaction(
uiState: SwapStateHolder,
txState: TxState,
onAlertClick: () -> Unit,
): SwapStateHolder {
fun createErrorTransaction(uiState: SwapStateHolder, txState: TxState, onAlertClick: () -> Unit): SwapStateHolder {
return uiState.copy(
alert = SwapWarning.GenericWarning(
message = null,

View file

@ -293,9 +293,7 @@ private fun FeeItem(feeState: FeeState, currency: String) {
}
@Composable
private fun SwapWarnings(
warnings: List<SwapWarning>,
) {
private fun SwapWarnings(warnings: List<SwapWarning>) {
Column(
modifier = Modifier
.background(color = TangemTheme.colors.background.secondary)

View file

@ -198,10 +198,7 @@ private fun TokenItem(token: TokenToSelect, network: Network, onTokenClick: () -
@Suppress("MagicNumber")
@Composable
private fun TokenIcon(
token: TokenToSelect,
@DrawableRes iconPlaceholder: Int?,
) {
private fun TokenIcon(token: TokenToSelect, @DrawableRes iconPlaceholder: Int?) {
val data = token.iconUrl.ifEmpty {
iconPlaceholder
}
@ -233,9 +230,7 @@ private fun TokenIcon(
}
@Composable
private fun TokenImageShimmer(
modifier: Modifier = Modifier,
) {
private fun TokenImageShimmer(modifier: Modifier = Modifier) {
Box(modifier = modifier.shimmer()) {
Box(
modifier = Modifier

View file

@ -121,11 +121,7 @@ fun TransactionCard(
}
@Composable
private fun Header(
type: TransactionCardType,
balance: String,
modifier: Modifier = Modifier,
) {
private fun Header(type: TransactionCardType, balance: String, modifier: Modifier = Modifier) {
Row(
modifier = modifier
.fillMaxWidth()
@ -383,9 +379,7 @@ private fun makePriceImpactBalanceWarning(value: String, priceImpactPercents: In
}
@Composable
private fun TokenImageShimmer(
modifier: Modifier = Modifier,
) {
private fun TokenImageShimmer(modifier: Modifier = Modifier) {
Box(modifier = modifier.shimmer()) {
Box(
modifier = Modifier

View file

@ -159,11 +159,7 @@ internal class SwapViewModel @Inject constructor(
}
}
private fun loadQuotesTask(
fromToken: Currency,
toToken: Currency,
amount: String,
): PeriodicTask<SwapState> {
private fun loadQuotesTask(fromToken: Currency, toToken: Currency, amount: String): PeriodicTask<SwapState> {
return PeriodicTask(
UPDATE_DELAY,
task = {