From 0c30570ffe913dbbed44571d7aa0782e6e6e67c5 Mon Sep 17 00:00:00 2001 From: tim Date: Wed, 17 May 2023 21:11:45 +0300 Subject: [PATCH] Fix log --- .../transfer/ConnectTransferContent.kt | 31 ++++++++++++------- .../TonConnectBottomSheetTransferContent.kt | 30 +++++++++++++----- 2 files changed, 43 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/com/github/tim06/wallet_contest/ui/feature/main/tonconnect/transfer/ConnectTransferContent.kt b/app/src/main/java/com/github/tim06/wallet_contest/ui/feature/main/tonconnect/transfer/ConnectTransferContent.kt index 7d8d9de..5f584d2 100644 --- a/app/src/main/java/com/github/tim06/wallet_contest/ui/feature/main/tonconnect/transfer/ConnectTransferContent.kt +++ b/app/src/main/java/com/github/tim06/wallet_contest/ui/feature/main/tonconnect/transfer/ConnectTransferContent.kt @@ -5,28 +5,38 @@ import androidx.compose.animation.core.animateFloat import androidx.compose.animation.core.tween import androidx.compose.animation.core.updateTransition import androidx.compose.foundation.background -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.CircularProgressIndicator import androidx.compose.material.Icon import androidx.compose.material.MaterialTheme import androidx.compose.material.Text -import androidx.compose.runtime.* +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha -import androidx.compose.ui.draw.drawWithContent -import androidx.compose.ui.geometry.Offset import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.StrokeCap import androidx.compose.ui.layout.onGloballyPositioned -import androidx.compose.ui.layout.positionInParent import androidx.compose.ui.layout.positionInRoot import androidx.compose.ui.platform.LocalConfiguration -import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource -import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp @@ -40,13 +50,12 @@ import com.github.tim06.wallet_contest.ui.theme.BalanceBigTextStyle import com.github.tim06.wallet_contest.ui.theme.InterRegular import com.github.tim06.wallet_contest.ui.theme.RobotoMonoRegular import com.github.tim06.wallet_contest.ui.theme.TonBlue10 -import com.github.tim06.wallet_contest.util.transformAddress @Composable fun ConnectTransferContent() { - var tonCount by remember { mutableStateOf("2") } - var recipientAddress by remember { mutableStateOf("EQCcqweqweqweqwewq9ZLD".transformAddress()) } - var fee by remember { mutableStateOf("≈ 0.004 TON") } + val tonCount by remember { mutableStateOf("2") } + val recipientAddress by remember { mutableStateOf("") } + val fee by remember { mutableStateOf("≈ 0.004 TON") } Box( modifier = Modifier.background( color = MaterialTheme.colors.background, diff --git a/app/src/main/java/com/github/tim06/wallet_contest/ui/feature/tonConnect/transfer/TonConnectBottomSheetTransferContent.kt b/app/src/main/java/com/github/tim06/wallet_contest/ui/feature/tonConnect/transfer/TonConnectBottomSheetTransferContent.kt index 8e1c22c..9ef6f99 100644 --- a/app/src/main/java/com/github/tim06/wallet_contest/ui/feature/tonConnect/transfer/TonConnectBottomSheetTransferContent.kt +++ b/app/src/main/java/com/github/tim06/wallet_contest/ui/feature/tonConnect/transfer/TonConnectBottomSheetTransferContent.kt @@ -5,13 +5,34 @@ import androidx.compose.animation.core.animateFloat import androidx.compose.animation.core.tween import androidx.compose.animation.core.updateTransition import androidx.compose.foundation.background -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxScope +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBarsPadding +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.CircularProgressIndicator import androidx.compose.material.Icon import androidx.compose.material.MaterialTheme import androidx.compose.material.Text -import androidx.compose.runtime.* +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.SideEffect +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha @@ -22,11 +43,9 @@ import androidx.compose.ui.layout.positionInRoot import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource -import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp -import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner import androidx.lifecycle.viewmodel.compose.viewModel import com.github.tim06.wallet_contest.R import com.github.tim06.wallet_contest.ton.TonWalletClient @@ -35,12 +54,10 @@ import com.github.tim06.wallet_contest.ui.components.button.TonButton import com.github.tim06.wallet_contest.ui.components.rlottie.LottieIcon import com.github.tim06.wallet_contest.ui.components.row.TonRow import com.github.tim06.wallet_contest.ui.components.title.TonTitle -import com.github.tim06.wallet_contest.ui.feature.tonConnect.ButtonState import com.github.tim06.wallet_contest.ui.theme.BalanceBigTextStyle import com.github.tim06.wallet_contest.ui.theme.InterRegular import com.github.tim06.wallet_contest.ui.theme.RobotoMonoRegular import com.github.tim06.wallet_contest.ui.theme.TonBlue10 -import com.github.tim06.wallet_contest.util.transformAddress @Composable fun TonConnectBottomSheetTransferContent( @@ -239,7 +256,6 @@ private fun Buttons( buttonState is TonConnectTransferButtonState.Success } } - println("qweqwebuttonState: ${buttonState} // ${connected}") val transition = updateTransition( targetState = connected,