Updated on 2026-08-14
This commit is contained in:
parent
1d8522dca6
commit
0039672af9
19 changed files with 146 additions and 90 deletions
|
|
@ -192,17 +192,17 @@ class WalletConnectSdkHelper {
|
|||
),
|
||||
)
|
||||
return when (result) {
|
||||
SimpleResult.Success -> {
|
||||
is Result.Success -> {
|
||||
val sentFrom = CoreAnalyticsParam.TxSentFrom.WalletConnect
|
||||
Analytics.send(Basic.TransactionSent(sentFrom = sentFrom, memoType = MemoType.Null))
|
||||
val hash = data.walletManager.wallet.recentTransactions.last().hash
|
||||
if (hash?.startsWith(HEX_PREFIX) == true) {
|
||||
val hash = result.data.hash
|
||||
if (hash.startsWith(HEX_PREFIX)) {
|
||||
hash
|
||||
} else {
|
||||
HEX_PREFIX + hash
|
||||
}
|
||||
}
|
||||
is SimpleResult.Failure -> {
|
||||
is Result.Failure -> {
|
||||
Timber.e(result.error as BlockchainSdkError)
|
||||
null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import com.tangem.blockchain.blockchains.ton.TonTransactionExtras
|
|||
import com.tangem.blockchain.blockchains.xrp.XrpTransactionBuilder.XrpTransactionExtras
|
||||
import com.tangem.blockchain.common.*
|
||||
import com.tangem.blockchain.common.transaction.Fee
|
||||
import com.tangem.blockchain.extensions.SimpleResult
|
||||
import com.tangem.blockchain.extensions.Result
|
||||
import com.tangem.blockchainsdk.utils.minimalAmount
|
||||
import com.tangem.common.core.TangemSdkError
|
||||
import com.tangem.core.analytics.Analytics
|
||||
|
|
@ -246,7 +246,7 @@ private fun sendTransaction(
|
|||
tangemSdk.config.linkedTerminal = linkedTerminalState
|
||||
|
||||
when (sendResult) {
|
||||
is SimpleResult.Success -> {
|
||||
is Result.Success -> {
|
||||
dispatch(SendAction.SendSuccess)
|
||||
|
||||
if (externalTransactionData != null) {
|
||||
|
|
@ -273,7 +273,7 @@ private fun sendTransaction(
|
|||
dispatch(NavigationAction.PopBackTo())
|
||||
}
|
||||
}
|
||||
is SimpleResult.Failure -> {
|
||||
is Result.Failure -> {
|
||||
updateFeedbackManagerInfo(
|
||||
sendResult = sendResult.error,
|
||||
walletManager = walletManager,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import com.tangem.blockchain.blockchains.xrp.XrpTransactionBuilder
|
|||
import com.tangem.blockchain.common.*
|
||||
import com.tangem.blockchain.common.transaction.Fee
|
||||
import com.tangem.blockchain.common.transaction.TransactionFee
|
||||
import com.tangem.blockchain.common.transaction.TransactionSendResult
|
||||
import com.tangem.blockchain.extensions.Result
|
||||
import com.tangem.blockchain.extensions.SimpleResult
|
||||
import com.tangem.blockchain.externallinkprovider.TxExploreState
|
||||
import com.tangem.blockchain.network.ResultChecker
|
||||
import com.tangem.blockchainsdk.utils.fromNetworkId
|
||||
|
|
@ -363,12 +363,12 @@ class TransactionManagerImpl(
|
|||
}
|
||||
}
|
||||
|
||||
private fun handleSendResult(result: SimpleResult): SendTxResult {
|
||||
private fun handleSendResult(result: Result<TransactionSendResult>): SendTxResult {
|
||||
when (result) {
|
||||
is SimpleResult.Success -> {
|
||||
is Result.Success -> {
|
||||
return SendTxResult.Success
|
||||
}
|
||||
is SimpleResult.Failure -> {
|
||||
is Result.Failure -> {
|
||||
if (ResultChecker.isNetworkError(result)) return SendTxResult.NetworkError(result.error)
|
||||
val error = result.error as? BlockchainSdkError ?: return SendTxResult.UnknownError()
|
||||
when (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue