Updated on 2026-08-14
This commit is contained in:
parent
443560a5fd
commit
ad0c793b00
3 changed files with 7 additions and 5 deletions
|
|
@ -320,5 +320,5 @@ internal sealed class AddCustomTokenWarning(val description: TextReference) {
|
|||
internal data class AddCustomTokenFloatingButton(
|
||||
val isEnabled: Boolean,
|
||||
val showProgress: Boolean,
|
||||
val onClick: () -> Unit
|
||||
val onClick: () -> Unit,
|
||||
)
|
||||
|
|
@ -94,7 +94,7 @@ internal object AddCustomTokenPreviewData {
|
|||
floatingButton = AddCustomTokenFloatingButton(
|
||||
isEnabled = false,
|
||||
showProgress = false,
|
||||
onClick = {}
|
||||
onClick = {},
|
||||
),
|
||||
testBlock = AddCustomTokenTestBlock(
|
||||
chooseTokenButtonText = "Choose token",
|
||||
|
|
@ -119,7 +119,8 @@ internal object AddCustomTokenPreviewData {
|
|||
floatingButton = AddCustomTokenFloatingButton(
|
||||
isEnabled = false,
|
||||
showProgress = false,
|
||||
onClick = {}),
|
||||
onClick = {},
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -145,7 +145,8 @@ internal class AddCustomTokenViewModel @Inject constructor(
|
|||
return AddCustomTokenFloatingButton(
|
||||
isEnabled = true,
|
||||
showProgress = false,
|
||||
onClick = actionsHandler::onAddCustomTokenClick)
|
||||
onClick = actionsHandler::onAddCustomTokenClick,
|
||||
)
|
||||
}
|
||||
|
||||
private inner class FormStateBuilder {
|
||||
|
|
@ -857,7 +858,7 @@ internal class AddCustomTokenViewModel @Inject constructor(
|
|||
viewModelScope.launch(dispatchers.io) {
|
||||
val oldButtonState = uiState.floatingButton
|
||||
uiState = uiState.copySealed(
|
||||
floatingButton = uiState.floatingButton.copy(isEnabled = false, showProgress = true)
|
||||
floatingButton = uiState.floatingButton.copy(isEnabled = false, showProgress = true),
|
||||
)
|
||||
runCatching { featureInteractor.saveToken(currency) }
|
||||
.onSuccess { featureRouter.openWalletScreen() }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue