Updated on 2026-08-14
This commit is contained in:
parent
952dbd4732
commit
7e375ac36b
20 changed files with 233 additions and 27 deletions
|
|
@ -388,8 +388,8 @@ internal class WalletModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun tangemPayCardOnClick(customerWalletAddress: String) {
|
||||
innerWalletRouter.openTangemPayDetails(customerWalletAddress)
|
||||
private fun tangemPayCardOnClick(customerWalletAddress: String, cardNumberEnd: String) {
|
||||
innerWalletRouter.openTangemPayDetails(customerWalletAddress, cardNumberEnd)
|
||||
}
|
||||
|
||||
private fun needToRefreshTimer() {
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ internal class DefaultWalletRouter @Inject constructor(
|
|||
router.push(AppRoute.TangemPayOnboarding(AppRoute.TangemPayOnboarding.Mode.ContinueOnboarding))
|
||||
}
|
||||
|
||||
override fun openTangemPayDetails(custoemrWalletAddress: String) {
|
||||
router.push(AppRoute.TangemPayDetails(custoemrWalletAddress))
|
||||
override fun openTangemPayDetails(customerWalletAddress: String, cardNumberEnd: String) {
|
||||
router.push(AppRoute.TangemPayDetails(customerWalletAddress, cardNumberEnd))
|
||||
}
|
||||
|
||||
override fun openYieldSupplyBottomSheet(
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ internal interface InnerWalletRouter {
|
|||
|
||||
fun openTangemPayOnboarding()
|
||||
|
||||
fun openTangemPayDetails(custoemrWalletAddress: String)
|
||||
fun openTangemPayDetails(customerWalletAddress: String, cardNumberEnd: String)
|
||||
|
||||
/** Open BS abput yield supply active and all money deposited in AAVE */
|
||||
fun openYieldSupplyBottomSheet(
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ internal class TangemPayStateTransformer(
|
|||
private val value: MainScreenCustomerInfo? = null,
|
||||
private val onIssueOrderClick: () -> Unit = {},
|
||||
private val onContinueKycClick: () -> Unit = {},
|
||||
private val cardOnClick: (String) -> Unit = {},
|
||||
private val cardOnClick: (customerWalletAddress: String, cardNumberEnd: String) -> Unit = { _, _ -> },
|
||||
private val issueProgressState: Boolean = false,
|
||||
private val issueState: Boolean = false,
|
||||
) : Transformer<TangemPayState> {
|
||||
|
|
@ -33,8 +33,8 @@ internal class TangemPayStateTransformer(
|
|||
return when {
|
||||
value == null -> TangemPayState.Empty
|
||||
!value.info.isKycApproved() -> createKycInProgressState(onContinueKycClick)
|
||||
value.orderStatus == NOT_ISSUED || value.orderStatus == CANCELED -> createIssueState()
|
||||
cardInfo != null -> getCardInfoState(cardInfo)
|
||||
value.orderStatus == NOT_ISSUED || value.orderStatus == CANCELED -> createIssueState()
|
||||
else -> createIssueProgressState()
|
||||
}
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ internal class TangemPayStateTransformer(
|
|||
private fun getCardInfoState(cardInfo: CardInfo): TangemPayState = TangemPayState.Card(
|
||||
lastFourDigits = TextReference.Str("*${cardInfo.lastFourDigits}"),
|
||||
balanceText = TextReference.Str(getBalanceText(cardInfo)),
|
||||
onClick = { cardOnClick(cardInfo.customerWalletAddress) },
|
||||
onClick = { cardOnClick(cardInfo.customerWalletAddress, cardInfo.lastFourDigits) },
|
||||
)
|
||||
|
||||
private fun getBalanceText(cardInfo: CardInfo): String {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue