Updated on 2026-08-14
This commit is contained in:
parent
82e329adaa
commit
45b7742914
3 changed files with 8 additions and 8 deletions
|
|
@ -105,7 +105,6 @@ internal class SwapRepositoryImpl @Inject constructor(
|
|||
throw exception
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -579,11 +579,7 @@ internal class StateBuilder(
|
|||
}
|
||||
}
|
||||
|
||||
fun createInitialErrorState(
|
||||
uiState: SwapStateHolder,
|
||||
code: Int,
|
||||
onRefreshClick: () -> Unit,
|
||||
): SwapStateHolder {
|
||||
fun createInitialErrorState(uiState: SwapStateHolder, code: Int, onRefreshClick: () -> Unit): SwapStateHolder {
|
||||
return uiState.copy(
|
||||
warnings = listOf(
|
||||
SwapWarning.GeneralWarning(
|
||||
|
|
|
|||
|
|
@ -176,10 +176,15 @@ internal class SwapViewModel @Inject constructor(
|
|||
)
|
||||
|
||||
uiState =
|
||||
stateBuilder.createInitialErrorState(uiState, (it as? ExpressException)?.dataError?.code ?: DataError.UnknownError.code) {
|
||||
stateBuilder.createInitialErrorState(
|
||||
uiState,
|
||||
(it as? ExpressException)?.dataError?.code ?: DataError.UnknownError.code,
|
||||
) {
|
||||
uiState = stateBuilder.createInitialLoadingState(
|
||||
initialCurrency = initialCryptoCurrency,
|
||||
networkInfo = blockchainInteractor.getBlockchainInfo(initialCryptoCurrency.network.backendId),
|
||||
networkInfo = blockchainInteractor.getBlockchainInfo(
|
||||
initialCryptoCurrency.network.backendId,
|
||||
),
|
||||
)
|
||||
initTokens()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue