Updated on 2026-08-14
This commit is contained in:
parent
ef2cb2ce43
commit
a0bf0bbdad
10 changed files with 98 additions and 30 deletions
|
|
@ -717,7 +717,6 @@ internal class StateBuilder(
|
|||
fun createSuccessState(
|
||||
uiState: SwapStateHolder,
|
||||
txState: TxState.TxSent,
|
||||
txUrl: String,
|
||||
dataState: SwapProcessDataState,
|
||||
onExploreClick: () -> Unit,
|
||||
onStatusClick: () -> Unit,
|
||||
|
|
@ -735,7 +734,7 @@ internal class StateBuilder(
|
|||
return uiState.copy(
|
||||
successState = SwapSuccessStateHolder(
|
||||
timestamp = txState.timestamp,
|
||||
txUrl = txUrl,
|
||||
txUrl = txState.txUrl.orEmpty(),
|
||||
providerName = stringReference(providerState.name),
|
||||
providerType = stringReference(providerState.type),
|
||||
showStatusButton = providerState.type == ExchangeProviderType.CEX.name,
|
||||
|
|
|
|||
|
|
@ -447,19 +447,14 @@ internal class SwapViewModel @Inject constructor(
|
|||
}.onSuccess {
|
||||
when (it) {
|
||||
is TxState.TxSent -> {
|
||||
val url = blockchainInteractor.getExplorerTransactionLink(
|
||||
networkId = fromCurrency.currency.network.backendId,
|
||||
txAddress = it.txAddress,
|
||||
)
|
||||
uiState = stateBuilder.createSuccessState(
|
||||
uiState = uiState,
|
||||
txState = it,
|
||||
dataState = dataState,
|
||||
txUrl = url,
|
||||
onExploreClick = {
|
||||
val txHash = it.txAddress
|
||||
if (txHash.isNotEmpty()) {
|
||||
swapRouter.openUrl(url)
|
||||
val txUrl = it.txUrl
|
||||
if (!txUrl.isNullOrBlank()) {
|
||||
swapRouter.openUrl(txUrl)
|
||||
}
|
||||
analyticsEventHandler.send(
|
||||
event = SwapEvents.ButtonExplore(initialCryptoCurrency.symbol),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue