Updated on 2026-08-14
This commit is contained in:
parent
e97cb41fdb
commit
e08c33ea78
17 changed files with 115 additions and 115 deletions
|
|
@ -25,9 +25,9 @@ import com.tangem.operations.derivation.DeriveMultipleWalletPublicKeysTask
|
|||
import com.tangem.operations.pins.CheckUserCodesCommand
|
||||
import com.tangem.operations.pins.CheckUserCodesResponse
|
||||
import com.tangem.operations.pins.SetUserCodeCommand
|
||||
import com.tangem.tap.common.analytics.Analytics
|
||||
import com.tangem.tap.common.analytics.AnalyticsEvent
|
||||
import com.tangem.tap.common.analytics.AnalyticsParam
|
||||
import com.tangem.tap.common.analytics.AnalyticsAnOld
|
||||
import com.tangem.tap.common.analytics.AnalyticsEventAnOld
|
||||
import com.tangem.tap.common.analytics.AnalyticsParamAnOld
|
||||
import com.tangem.tap.common.analytics.GlobalAnalyticsEventHandler
|
||||
import com.tangem.tap.domain.tasks.CreateWalletAndRescanTask
|
||||
import com.tangem.tap.domain.tasks.product.ResetToFactorySettingsTask
|
||||
|
|
@ -49,7 +49,7 @@ class TangemSdkManager(private val tangemSdk: TangemSdk, private val context: Co
|
|||
additionalBlockchainsToDerive: Collection<Blockchain>? = null,
|
||||
messageRes: Int? = null,
|
||||
): CompletionResult<ScanResponse> {
|
||||
analyticsHandler?.handleAnalyticsEvent(AnalyticsEvent.READY_TO_SCAN, card = null)
|
||||
analyticsHandler?.handleAnalyticsEvent(AnalyticsEventAnOld.READY_TO_SCAN, card = null)
|
||||
|
||||
val message = Message(context.getString(messageRes ?: R.string.initial_message_scan_header))
|
||||
return runTaskAsyncReturnOnMain(
|
||||
|
|
@ -75,14 +75,14 @@ class TangemSdkManager(private val tangemSdk: TangemSdk, private val context: Co
|
|||
when (result) {
|
||||
is CompletionResult.Success -> {
|
||||
analyticsHandler?.handleAnalyticsEvent(
|
||||
event = AnalyticsEvent.CARD_IS_SCANNED,
|
||||
event = AnalyticsEventAnOld.CARD_IS_SCANNED,
|
||||
card = result.data.card,
|
||||
blockchain = result.data.walletData?.blockchain
|
||||
)
|
||||
if (DemoHelper.isDemoCard(result.data)) {
|
||||
analyticsHandler?.handleAnalyticsEvent(
|
||||
event = AnalyticsEvent.DEMO_MODE_ACTIVATED,
|
||||
params = mapOf(AnalyticsParam.CARD_ID.param to result.data.card.cardId),
|
||||
event = AnalyticsEventAnOld.DEMO_MODE_ACTIVATED,
|
||||
params = mapOf(AnalyticsParamAnOld.CARD_ID.param to result.data.card.cardId),
|
||||
card = result.data.card,
|
||||
blockchain = result.data.walletData?.blockchain
|
||||
)
|
||||
|
|
@ -92,7 +92,7 @@ class TangemSdkManager(private val tangemSdk: TangemSdk, private val context: Co
|
|||
(result.error as? TangemSdkError)?.let { error ->
|
||||
analyticsHandler?.handleCardSdkErrorEvent(
|
||||
error = error,
|
||||
action = Analytics.ActionToLog.Scan
|
||||
action = AnalyticsAnOld.ActionToLog.Scan
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import com.tangem.domain.common.ScanResponse
|
|||
import com.tangem.network.common.MoshiConverter
|
||||
import com.tangem.operations.wallet.CreateWalletResponse
|
||||
import com.tangem.tap.common.AssetReader
|
||||
import com.tangem.tap.common.analytics.Analytics
|
||||
import com.tangem.tap.common.analytics.AnalyticsAnOld
|
||||
import com.tangem.tap.common.analytics.GlobalAnalyticsEventHandler
|
||||
import com.tangem.tap.tangemSdkManager
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ class TwinCardsManager(
|
|||
(response.error as? TangemSdkError)?.let { error ->
|
||||
analyticsHandler?.handleCardSdkErrorEvent(
|
||||
error,
|
||||
Analytics.ActionToLog.CreateWallet,
|
||||
AnalyticsAnOld.ActionToLog.CreateWallet,
|
||||
card = card
|
||||
)
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ class TwinCardsManager(
|
|||
(response.error as? TangemSdkError)?.let { error ->
|
||||
analyticsHandler?.handleCardSdkErrorEvent(
|
||||
error,
|
||||
Analytics.ActionToLog.CreateWallet,
|
||||
AnalyticsAnOld.ActionToLog.CreateWallet,
|
||||
card = card
|
||||
)
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ class TwinCardsManager(
|
|||
(response.error as? TangemSdkError)?.let { error ->
|
||||
analyticsHandler?.handleCardSdkErrorEvent(
|
||||
error,
|
||||
Analytics.ActionToLog.WriteIssuerData,
|
||||
AnalyticsAnOld.ActionToLog.WriteIssuerData,
|
||||
card = card
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import com.tangem.blockchain.common.Blockchain
|
|||
import com.tangem.common.card.EllipticCurve
|
||||
import com.tangem.common.extensions.guard
|
||||
import com.tangem.domain.common.ScanResponse
|
||||
import com.tangem.tap.common.analytics.Analytics
|
||||
import com.tangem.tap.common.analytics.AnalyticsAnOld
|
||||
import com.tangem.tap.common.analytics.logWcEvent
|
||||
import com.tangem.tap.common.extensions.dispatchOnMain
|
||||
import com.tangem.tap.common.redux.global.GlobalAction
|
||||
|
|
@ -202,8 +202,8 @@ class WalletConnectManager {
|
|||
|
||||
private fun onSessionClosed(session: WCSession) {
|
||||
store.state.globalState.analyticsHandler?.logWcEvent(
|
||||
Analytics.WcAnalyticsEvent.Session(
|
||||
Analytics.WcSessionEvent.Disconnect, sessions[session]?.peerMeta?.url
|
||||
AnalyticsAnOld.WcAnalyticsEvent.Session(
|
||||
AnalyticsAnOld.WcSessionEvent.Disconnect, sessions[session]?.peerMeta?.url
|
||||
)
|
||||
)
|
||||
sessions.remove(session)
|
||||
|
|
@ -343,8 +343,8 @@ class WalletConnectManager {
|
|||
)
|
||||
}
|
||||
store.state.globalState.analyticsHandler?.logWcEvent(
|
||||
Analytics.WcAnalyticsEvent.Session(
|
||||
Analytics.WcSessionEvent.Connect, peer.url
|
||||
AnalyticsAnOld.WcAnalyticsEvent.Session(
|
||||
AnalyticsAnOld.WcSessionEvent.Connect, peer.url
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
@ -357,8 +357,8 @@ class WalletConnectManager {
|
|||
client.onEthSendTransaction = { id: Long, transaction: WCEthereumTransaction ->
|
||||
Timber.d("onEthSendTransaction: $transaction")
|
||||
store.state.globalState.analyticsHandler?.logWcEvent(
|
||||
Analytics.WcAnalyticsEvent.Action(
|
||||
Analytics.WcAction.SendTransaction
|
||||
AnalyticsAnOld.WcAnalyticsEvent.Action(
|
||||
AnalyticsAnOld.WcAction.SendTransaction
|
||||
)
|
||||
)
|
||||
sessions[client.session]?.toWalletConnectSession()?.let { sessionData ->
|
||||
|
|
@ -375,8 +375,8 @@ class WalletConnectManager {
|
|||
client.onEthSignTransaction = { id: Long, transaction: WCEthereumTransaction ->
|
||||
Timber.d("onEthSignTransaction: $transaction")
|
||||
store.state.globalState.analyticsHandler?.logWcEvent(
|
||||
Analytics.WcAnalyticsEvent.Action(
|
||||
Analytics.WcAction.SignTransaction
|
||||
AnalyticsAnOld.WcAnalyticsEvent.Action(
|
||||
AnalyticsAnOld.WcAction.SignTransaction
|
||||
)
|
||||
)
|
||||
sessions[client.session]?.toWalletConnectSession()?.let { sessionData ->
|
||||
|
|
@ -393,8 +393,8 @@ class WalletConnectManager {
|
|||
client.onEthSign = { id: Long, message: WCEthereumSignMessage ->
|
||||
Timber.d("onEthSign: $message")
|
||||
store.state.globalState.analyticsHandler?.logWcEvent(
|
||||
Analytics.WcAnalyticsEvent.Action(
|
||||
Analytics.WcAction.PersonalSign
|
||||
AnalyticsAnOld.WcAnalyticsEvent.Action(
|
||||
AnalyticsAnOld.WcAction.PersonalSign
|
||||
)
|
||||
)
|
||||
sessions[client.session]?.toWalletConnectSession()?.let { sessionData ->
|
||||
|
|
@ -469,8 +469,8 @@ class WalletConnectManager {
|
|||
if (message != null) {
|
||||
Timber.d("onEthSign_v4: $message")
|
||||
store.state.globalState.analyticsHandler?.logWcEvent(
|
||||
Analytics.WcAnalyticsEvent.Action(
|
||||
Analytics.WcAction.PersonalSign
|
||||
AnalyticsAnOld.WcAnalyticsEvent.Action(
|
||||
AnalyticsAnOld.WcAction.PersonalSign
|
||||
)
|
||||
)
|
||||
sessions[client.session]?.toWalletConnectSession()?.let { sessionData ->
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import com.tangem.common.extensions.toDecompressedPublicKey
|
|||
import com.tangem.common.extensions.toHexString
|
||||
import com.tangem.crypto.CryptoUtils
|
||||
import com.tangem.operations.sign.SignHashCommand
|
||||
import com.tangem.tap.common.analytics.Analytics
|
||||
import com.tangem.tap.common.analytics.AnalyticsAnOld
|
||||
import com.tangem.tap.common.extensions.safeUpdate
|
||||
import com.tangem.tap.common.extensions.toFormattedString
|
||||
import com.tangem.tap.features.details.redux.walletconnect.WalletConnectSession
|
||||
|
|
@ -145,7 +145,7 @@ class WalletConnectSdkHelper {
|
|||
is SimpleResult.Failure -> {
|
||||
store.state.globalState.analyticsHandler?.handleBlockchainSdkErrorEvent(
|
||||
result.error,
|
||||
Analytics.ActionToLog.WalletConnectTransaction,
|
||||
AnalyticsAnOld.ActionToLog.WalletConnectTransaction,
|
||||
)
|
||||
Timber.e(result.error as BlockchainSdkError)
|
||||
null
|
||||
|
|
@ -175,7 +175,7 @@ class WalletConnectSdkHelper {
|
|||
(result.error as? TangemSdkError)?.let { error ->
|
||||
store.state.globalState.analyticsHandler?.handleCardSdkErrorEvent(
|
||||
error,
|
||||
Analytics.ActionToLog.WalletConnectSign,
|
||||
AnalyticsAnOld.ActionToLog.WalletConnectSign,
|
||||
)
|
||||
}
|
||||
Timber.e(result.error.customMessage)
|
||||
|
|
@ -204,7 +204,7 @@ class WalletConnectSdkHelper {
|
|||
(result.error as? TangemSdkError)?.let { error ->
|
||||
store.state.globalState.analyticsHandler?.handleCardSdkErrorEvent(
|
||||
error,
|
||||
Analytics.ActionToLog.WalletConnectTransaction,
|
||||
AnalyticsAnOld.ActionToLog.WalletConnectTransaction,
|
||||
)
|
||||
}
|
||||
Timber.e(result.error.customMessage)
|
||||
|
|
@ -280,7 +280,7 @@ class WalletConnectSdkHelper {
|
|||
(result.error as? TangemSdkError)?.let { error ->
|
||||
store.state.globalState.analyticsHandler?.handleCardSdkErrorEvent(
|
||||
error,
|
||||
Analytics.ActionToLog.WalletConnectSign,
|
||||
AnalyticsAnOld.ActionToLog.WalletConnectSign,
|
||||
)
|
||||
}
|
||||
Timber.e(result.error.customMessage)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue