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