Updated on 2026-08-14
This commit is contained in:
parent
8b247ae291
commit
3d07a7dd18
1 changed files with 6 additions and 4 deletions
|
|
@ -894,13 +894,16 @@ internal class SendViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
private suspend fun sendTransaction(txData: TransactionData) {
|
||||
sendTransactionUseCase(
|
||||
val result = sendTransactionUseCase(
|
||||
txData = txData,
|
||||
userWallet = userWallet,
|
||||
network = cryptoCurrency.network,
|
||||
).fold(
|
||||
)
|
||||
|
||||
uiState = stateFactory.getSendingStateUpdate(isSending = false)
|
||||
|
||||
result.fold(
|
||||
ifLeft = { error ->
|
||||
uiState = stateFactory.getSendingStateUpdate(isSending = false)
|
||||
uiState = eventStateFactory.getSendTransactionErrorState(
|
||||
error = error,
|
||||
onConsume = { uiState = eventStateFactory.onConsumeEventState() },
|
||||
|
|
@ -908,7 +911,6 @@ internal class SendViewModel @Inject constructor(
|
|||
analyticsEventHandler.send(SendAnalyticEvents.TransactionError(cryptoCurrency.symbol))
|
||||
},
|
||||
ifRight = {
|
||||
uiState = stateFactory.getSendingStateUpdate(isSending = false)
|
||||
updateTransactionStatus(txData)
|
||||
addTokenToWalletIfNeeded()
|
||||
scheduleUpdates()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue