Updated on 2026-08-14
This commit is contained in:
parent
e8640b4865
commit
2726774a70
3 changed files with 10 additions and 10 deletions
|
|
@ -76,7 +76,7 @@ fun AddCustomTokenScreen(
|
|||
val selectedTestCase = remember { mutableStateOf(TestCase.ContractAddress) }
|
||||
|
||||
val bottomSheetScaffoldState = rememberBottomSheetScaffoldState(
|
||||
bottomSheetState = BottomSheetState(BottomSheetValue.Collapsed)
|
||||
bottomSheetState = BottomSheetState(BottomSheetValue.Collapsed),
|
||||
)
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
val toggleBottomSheet = { coroutineScope.launch { bottomSheetScaffoldState.toggle() } }
|
||||
|
|
@ -145,7 +145,7 @@ private fun ScreenContent(
|
|||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(16.dp)
|
||||
.padding(16.dp),
|
||||
) {
|
||||
FormFields(state, closePopupTrigger)
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ fun Warnings(warnings: List<AddCustomTokenError.Warning>) {
|
|||
AddCustomTokenWarning(
|
||||
modifier = modifier.fillMaxWidth(),
|
||||
warning = item,
|
||||
converter = warningConverter
|
||||
converter = warningConverter,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ private fun AddButton(state: MutableState<AddCustomTokenState>) {
|
|||
AddCustomTokenFab(
|
||||
modifier = Modifier
|
||||
.widthIn(210.dp, 280.dp),
|
||||
isEnabled = state.value.screenState.addButton.isEnabled
|
||||
isEnabled = state.value.screenState.addButton.isEnabled,
|
||||
) { domainStore.dispatch(AddCustomTokenAction.OnAddCustomTokenClicked) }
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ private fun AddButton(state: MutableState<AddCustomTokenState>) {
|
|||
private fun AddCustomTokenFab(
|
||||
modifier: Modifier = Modifier,
|
||||
isEnabled: Boolean = true,
|
||||
onClick: () -> Unit
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
val contentColor = Color.White
|
||||
val backgroundColor = if (isEnabled) {
|
||||
|
|
@ -250,19 +250,19 @@ data class ScreenFieldData(
|
|||
val field: DataField<*>,
|
||||
val error: AddCustomTokenError?,
|
||||
val errorConverter: ModuleMessageConverter,
|
||||
val viewState: ViewStates.TokenField
|
||||
val viewState: ViewStates.TokenField,
|
||||
) {
|
||||
companion object {
|
||||
fun fromState(
|
||||
field: DataField<*>,
|
||||
state: AddCustomTokenState,
|
||||
errorConverter: ModuleMessageConverter
|
||||
errorConverter: ModuleMessageConverter,
|
||||
): ScreenFieldData {
|
||||
return ScreenFieldData(
|
||||
field = field,
|
||||
error = state.getError(field.id),
|
||||
errorConverter = errorConverter,
|
||||
viewState = selectField(field.id, state.screenState)
|
||||
viewState = selectField(field.id, state.screenState),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ class MultiWalletReducer {
|
|||
derivationPath = action.blockchain.derivationPath,
|
||||
),
|
||||
walletRent = findWalletRent(state.getWalletStore(walletManager.wallet)),
|
||||
historyTransactions = walletManager.getTokenTxHistory(action.token)
|
||||
historyTransactions = walletManager.getTokenTxHistory(action.token),
|
||||
)
|
||||
state.updateWalletData(newTokenWalletData)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import com.tangem.common.core.TangemError
|
|||
import org.rekotlin.Action
|
||||
|
||||
internal sealed interface WelcomeAction : Action {
|
||||
object OnCreate: WelcomeAction
|
||||
object OnCreate : WelcomeAction
|
||||
object ProceedWithBiometrics : WelcomeAction {
|
||||
object Success : WelcomeAction
|
||||
data class Error(val error: TangemError) : WelcomeAction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue