Updated on 2026-08-14
This commit is contained in:
parent
28ed702a51
commit
27e9400b2a
18 changed files with 67 additions and 88 deletions
|
|
@ -1,11 +1,12 @@
|
|||
package com.tangem.domain.feedback.models
|
||||
|
||||
import com.tangem.domain.models.network.Network
|
||||
|
||||
/**
|
||||
* Information about blockchain's operation error
|
||||
*
|
||||
* @property errorMessage message about error
|
||||
* @property blockchainId blockchain id
|
||||
* @property derivationPath derivation path
|
||||
* @property networkId network ID
|
||||
* @property destinationAddress destination address
|
||||
* @property tokenSymbol token symbol or null, if it isn't operation with token
|
||||
* @property amount amount
|
||||
|
|
@ -13,8 +14,7 @@ package com.tangem.domain.feedback.models
|
|||
*/
|
||||
data class BlockchainErrorInfo(
|
||||
val errorMessage: String,
|
||||
val blockchainId: String,
|
||||
val derivationPath: String?,
|
||||
val networkId: Network.ID?,
|
||||
val destinationAddress: String,
|
||||
val tokenSymbol: String?,
|
||||
val amount: String,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.domain.feedback.repository
|
||||
|
||||
import com.tangem.domain.feedback.models.*
|
||||
import com.tangem.domain.models.network.Network
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import java.io.File
|
||||
|
|
@ -17,11 +18,7 @@ interface FeedbackRepository {
|
|||
|
||||
fun getPhoneInfo(): PhoneInfo
|
||||
|
||||
suspend fun getBlockchainInfo(
|
||||
userWalletId: UserWalletId,
|
||||
blockchainId: String,
|
||||
derivationPath: String?,
|
||||
): BlockchainInfo?
|
||||
suspend fun getBlockchainInfo(userWalletId: UserWalletId, networkId: Network.ID): BlockchainInfo?
|
||||
|
||||
fun saveBlockchainErrorInfo(error: BlockchainErrorInfo)
|
||||
|
||||
|
|
|
|||
|
|
@ -94,11 +94,10 @@ class EmailMessageBodyResolver(
|
|||
|
||||
val userWalletId = requireNotNull(type.walletMetaInfo.userWalletId) { "UserWalletId must be not null" }
|
||||
val blockchainError = feedbackRepository.getBlockchainErrorInfo(userWalletId = userWalletId)
|
||||
val blockchainInfo = blockchainError?.let {
|
||||
val blockchainInfo = blockchainError?.networkId?.let { networkId ->
|
||||
feedbackRepository.getBlockchainInfo(
|
||||
userWalletId = userWalletId,
|
||||
blockchainId = blockchainError.blockchainId,
|
||||
derivationPath = blockchainError.derivationPath,
|
||||
networkId = networkId,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -159,11 +158,10 @@ class EmailMessageBodyResolver(
|
|||
|
||||
val userWalletId = requireNotNull(walletMetaInfo.userWalletId) { "UserWalletId must be not null" }
|
||||
val blockchainError = feedbackRepository.getBlockchainErrorInfo(userWalletId = userWalletId)
|
||||
val blockchainInfo = blockchainError?.let {
|
||||
val blockchainInfo = blockchainError?.networkId?.let { networkId ->
|
||||
feedbackRepository.getBlockchainInfo(
|
||||
userWalletId = userWalletId,
|
||||
blockchainId = blockchainError.blockchainId,
|
||||
derivationPath = blockchainError.derivationPath,
|
||||
networkId = networkId,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -181,11 +179,10 @@ class EmailMessageBodyResolver(
|
|||
|
||||
val userWalletId = requireNotNull(type.walletMetaInfo.userWalletId) { "UserWalletId must be not null" }
|
||||
val blockchainError = feedbackRepository.getBlockchainErrorInfo(userWalletId = userWalletId)
|
||||
val blockchainInfo = blockchainError?.let {
|
||||
val blockchainInfo = blockchainError?.networkId?.let { networkId ->
|
||||
feedbackRepository.getBlockchainInfo(
|
||||
userWalletId = userWalletId,
|
||||
blockchainId = blockchainError.blockchainId,
|
||||
derivationPath = blockchainError.derivationPath,
|
||||
networkId = networkId,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -210,11 +207,10 @@ class EmailMessageBodyResolver(
|
|||
|
||||
val userWalletId = requireNotNull(type.walletMetaInfo.userWalletId) { "UserWalletId must be not null" }
|
||||
val blockchainError = feedbackRepository.getBlockchainErrorInfo(userWalletId = userWalletId)
|
||||
val blockchainInfo = blockchainError?.let {
|
||||
val blockchainInfo = blockchainError?.networkId?.let { networkId ->
|
||||
feedbackRepository.getBlockchainInfo(
|
||||
userWalletId = userWalletId,
|
||||
blockchainId = blockchainError.blockchainId,
|
||||
derivationPath = blockchainError.derivationPath,
|
||||
networkId = networkId,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue