Updated on 2026-08-14
This commit is contained in:
parent
2a1369fce6
commit
5a99de87fb
29 changed files with 194 additions and 47 deletions
|
|
@ -202,6 +202,7 @@ internal class WalletComponent @AssistedInject constructor(
|
|||
address = dialogConfig.address,
|
||||
amount = dialogConfig.amount?.parseBigDecimal(currency.decimals),
|
||||
tag = dialogConfig.memo,
|
||||
entryType = AppRoute.Send.EntryType.Manual,
|
||||
)
|
||||
},
|
||||
onDismiss = model.innerWalletRouter.dialogNavigation::dismiss,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import androidx.compose.runtime.Stable
|
|||
import arrow.core.getOrElse
|
||||
import com.arkivanov.decompose.router.slot.activate
|
||||
import com.arkivanov.decompose.router.slot.dismiss
|
||||
import com.tangem.common.routing.AppRoute
|
||||
import com.tangem.core.analytics.api.AnalyticsEventHandler
|
||||
import com.tangem.core.ui.utils.parseBigDecimal
|
||||
import com.tangem.core.analytics.models.AnalyticsParam
|
||||
|
|
@ -767,6 +768,7 @@ internal class WalletModel @Inject constructor(
|
|||
userWalletId = stateHolder.getSelectedWalletId(),
|
||||
uri = target.uri,
|
||||
source = source,
|
||||
screen = WcPairRequest.Screen.MAIN,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
@ -777,6 +779,7 @@ internal class WalletModel @Inject constructor(
|
|||
address = target.address,
|
||||
amount = target.amount?.parseBigDecimal(target.currency.decimals),
|
||||
tag = target.memo,
|
||||
entryType = AppRoute.Send.EntryType.QR,
|
||||
)
|
||||
}
|
||||
is QrSendTarget.Multiple -> {
|
||||
|
|
@ -789,9 +792,17 @@ internal class WalletModel @Inject constructor(
|
|||
private fun handleQrError(error: ClassifiedQrContent.Error) {
|
||||
when (error) {
|
||||
is ClassifiedQrContent.Error.Unrecognized -> {
|
||||
analyticsEventsHandler.send(
|
||||
WalletScreenAnalyticsEvent.MainScreen.NoticeUnrecognizedQr(),
|
||||
)
|
||||
uiMessageSender.send(WalletAlertUM.qrCodeUnrecognized())
|
||||
}
|
||||
is ClassifiedQrContent.Error.UnsupportedNetwork -> {
|
||||
analyticsEventsHandler.send(
|
||||
WalletScreenAnalyticsEvent.MainScreen.NoticeNoAvailableTokens(
|
||||
blockchain = error.blockchain,
|
||||
),
|
||||
)
|
||||
uiMessageSender.send(WalletAlertUM.qrCodeUnsupportedNetwork())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,6 +382,7 @@ internal class WalletContentClickIntentsImplementor @Inject constructor(
|
|||
}
|
||||
|
||||
override fun onScanQrClick() {
|
||||
analyticsEventHandler.send(MainScreenAnalyticsEvent.ButtonQrScan())
|
||||
router.openQrScanner()
|
||||
}
|
||||
}
|
||||
|
|
@ -186,6 +186,7 @@ internal class DefaultWalletRouter @Inject constructor(
|
|||
address: String,
|
||||
amount: String?,
|
||||
tag: String?,
|
||||
entryType: AppRoute.Send.EntryType,
|
||||
) {
|
||||
router.push(
|
||||
AppRoute.Send(
|
||||
|
|
@ -194,6 +195,7 @@ internal class DefaultWalletRouter @Inject constructor(
|
|||
destinationAddress = address,
|
||||
amount = amount,
|
||||
tag = tag,
|
||||
entryType = entryType,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,14 @@ internal interface InnerWalletRouter {
|
|||
fun openQrScanner()
|
||||
|
||||
/** Open send screen with prefilled destination */
|
||||
fun openSend(userWalletId: UserWalletId, currency: CryptoCurrency, address: String, amount: String?, tag: String?)
|
||||
fun openSend(
|
||||
userWalletId: UserWalletId,
|
||||
currency: CryptoCurrency,
|
||||
address: String,
|
||||
amount: String?,
|
||||
tag: String?,
|
||||
entryType: AppRoute.Send.EntryType = AppRoute.Send.EntryType.Manual,
|
||||
)
|
||||
|
||||
/** Open network selection bottom sheet for multiple QR matches */
|
||||
fun openNetworkSelectionBottomSheet(target: QrSendTarget.Multiple)
|
||||
|
|
|
|||
|
|
@ -167,6 +167,17 @@ sealed class WalletScreenAnalyticsEvent {
|
|||
|
||||
class NoticeSeedPhraseSupportButtonDeclined : MainScreen(event = "Button - Support Declined")
|
||||
|
||||
class NoticeUnrecognizedQr : MainScreen(
|
||||
event = "Notice - Unrecognized QR",
|
||||
)
|
||||
|
||||
class NoticeNoAvailableTokens(blockchain: String?) : MainScreen(
|
||||
event = "Notice - No Available Tokens",
|
||||
params = buildMap {
|
||||
if (blockchain != null) put("Blockchain", blockchain)
|
||||
},
|
||||
)
|
||||
|
||||
// region Referral Promo
|
||||
class ReferralPromo : MainScreen(event = "Referral Banner")
|
||||
class ReferralPromoButtonParticipate : MainScreen(event = "Button - Referral Participate")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue