Updated on 2026-08-14
This commit is contained in:
parent
82a2266d04
commit
7bed9c04d1
6 changed files with 19 additions and 19 deletions
|
|
@ -62,7 +62,7 @@ internal object TangemPayTxHistoryDetailsConverter :
|
|||
is TangemPayTxHistoryItem.Payment -> ImageReference.Res(R.drawable.ic_arrow_up_24)
|
||||
is TangemPayTxHistoryItem.Spend -> {
|
||||
val merchantIcon = this.enrichedMerchantIconUrl
|
||||
if (merchantIcon != null) {
|
||||
if (!merchantIcon.isNullOrEmpty()) {
|
||||
ImageReference.Url(merchantIcon)
|
||||
} else {
|
||||
ImageReference.Res(R.drawable.ic_category_24)
|
||||
|
|
|
|||
|
|
@ -61,9 +61,7 @@ internal class DefaultTangemPayMainDeepLinkHandler @AssistedInject constructor(
|
|||
onComplete = {
|
||||
walletDeepLinkActionTrigger.selectWallet(userWalletId)
|
||||
when (pushAction) {
|
||||
is TangemPayPushAction.CardReady,
|
||||
is TangemPayPushAction.TopUp,
|
||||
-> navigateToTangemPayDetails(userWalletId)
|
||||
is TangemPayPushAction.CardReady -> navigateToTangemPayDetails(userWalletId)
|
||||
is TangemPayPushAction.TransactionSpend -> {
|
||||
walletDeepLinkActionTrigger.showTangemPayTransaction(
|
||||
transaction = pushAction.transaction,
|
||||
|
|
@ -89,12 +87,14 @@ internal class DefaultTangemPayMainDeepLinkHandler @AssistedInject constructor(
|
|||
|
||||
return when (type) {
|
||||
TangemPayPushNotificationType.CARD_READY -> TangemPayPushAction.CardReady
|
||||
TangemPayPushNotificationType.TRANSACTION_SPEND -> {
|
||||
TangemPayPushNotificationType.TRANSACTION_SPEND,
|
||||
TangemPayPushNotificationType.TRANSACTION_SPEND_REFUND,
|
||||
TangemPayPushNotificationType.DECLINED_TOP_UP,
|
||||
-> {
|
||||
val transaction = TangemPayPushPayloadToTxHistoryItemConverter.convertSpend(payload)
|
||||
if (transaction != null) TangemPayPushAction.TransactionSpend(transaction, customerId) else null
|
||||
}
|
||||
TangemPayPushNotificationType.TOP_UP -> TangemPayPushAction.TopUp
|
||||
TangemPayPushNotificationType.COLLATERAL -> {
|
||||
TangemPayPushNotificationType.COLLATERAL_DEPOSIT, TangemPayPushNotificationType.COLLATERAL_WITHDRAW -> {
|
||||
val transaction = TangemPayPushPayloadToTxHistoryItemConverter.convertCollateral(payload)
|
||||
if (transaction != null) TangemPayPushAction.CollateralTransaction(transaction, customerId) else null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,14 +7,12 @@ internal sealed class TangemPayPushAction {
|
|||
data object CardReady : TangemPayPushAction()
|
||||
|
||||
data class TransactionSpend(
|
||||
val transaction: TangemPayTxHistoryItem,
|
||||
val transaction: TangemPayTxHistoryItem.Spend,
|
||||
val customerId: String,
|
||||
) : TangemPayPushAction()
|
||||
|
||||
data object TopUp : TangemPayPushAction()
|
||||
|
||||
data class CollateralTransaction(
|
||||
val transaction: TangemPayTxHistoryItem,
|
||||
val transaction: TangemPayTxHistoryItem.Collateral,
|
||||
val customerId: String,
|
||||
) : TangemPayPushAction()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue