Updated on 2026-08-14
This commit is contained in:
parent
f0af317c92
commit
22f9c2be58
3 changed files with 7 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ class BlockchainApiExceptionEvent(
|
||||||
selectedHost: String,
|
selectedHost: String,
|
||||||
exceptionHost: String,
|
exceptionHost: String,
|
||||||
error: String,
|
error: String,
|
||||||
|
blockchain: String,
|
||||||
) : AnalyticsEvent(
|
) : AnalyticsEvent(
|
||||||
category = "BlockchainSdk",
|
category = "BlockchainSdk",
|
||||||
event = "Exception",
|
event = "Exception",
|
||||||
|
|
@ -13,5 +14,6 @@ class BlockchainApiExceptionEvent(
|
||||||
AnalyticsParam.BLOCKCHAIN_SELECTED_HOST to selectedHost,
|
AnalyticsParam.BLOCKCHAIN_SELECTED_HOST to selectedHost,
|
||||||
AnalyticsParam.BLOCKCHAIN_EXCEPTION_HOST to exceptionHost,
|
AnalyticsParam.BLOCKCHAIN_EXCEPTION_HOST to exceptionHost,
|
||||||
AnalyticsParam.ERROR_DESCRIPTION to error,
|
AnalyticsParam.ERROR_DESCRIPTION to error,
|
||||||
|
AnalyticsParam.BLOCKCHAIN to blockchain,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.tangem.tap.common.analytics.handlers
|
package com.tangem.tap.common.analytics.handlers
|
||||||
|
|
||||||
|
import com.tangem.blockchain.common.Blockchain
|
||||||
import com.tangem.blockchain.common.ExceptionHandlerOutput
|
import com.tangem.blockchain.common.ExceptionHandlerOutput
|
||||||
|
import com.tangem.blockchainsdk.utils.toNetworkId
|
||||||
import com.tangem.core.analytics.api.AnalyticsErrorHandler
|
import com.tangem.core.analytics.api.AnalyticsErrorHandler
|
||||||
import com.tangem.tap.common.analytics.events.BlockchainApiExceptionEvent
|
import com.tangem.tap.common.analytics.events.BlockchainApiExceptionEvent
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
@ -8,12 +10,13 @@ import javax.inject.Inject
|
||||||
class BlockchainExceptionHandler @Inject constructor(
|
class BlockchainExceptionHandler @Inject constructor(
|
||||||
private val analyticsErrorHandler: AnalyticsErrorHandler,
|
private val analyticsErrorHandler: AnalyticsErrorHandler,
|
||||||
) : ExceptionHandlerOutput {
|
) : ExceptionHandlerOutput {
|
||||||
override fun handleApiSwitch(currentHost: String, nextHost: String, message: String) {
|
override fun handleApiSwitch(currentHost: String, nextHost: String, message: String, blockchain: Blockchain) {
|
||||||
analyticsErrorHandler.sendErrorEvent(
|
analyticsErrorHandler.sendErrorEvent(
|
||||||
BlockchainApiExceptionEvent(
|
BlockchainApiExceptionEvent(
|
||||||
selectedHost = nextHost,
|
selectedHost = nextHost,
|
||||||
exceptionHost = currentHost,
|
exceptionHost = currentHost,
|
||||||
error = message,
|
error = message,
|
||||||
|
blockchain = blockchain.toNetworkId(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
# https://github.com/tangem/tangem-sdk-android/
|
# https://github.com/tangem/tangem-sdk-android/
|
||||||
# https://github.com/tangem/vico
|
# https://github.com/tangem/vico
|
||||||
|
|
||||||
tangemBlockchainSdk = "develop-1275"
|
tangemBlockchainSdk = "develop-1281"
|
||||||
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
||||||
tangemCardSdk = "develop-564"
|
tangemCardSdk = "develop-564"
|
||||||
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^
|
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue