From de63b38e1577f2d75c5fea53c1421ec96d034b06 Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 3 Apr 2026 18:58:35 +0400 Subject: [PATCH] Updated on 2026-08-14 --- .../tangem/features/approval/impl/model/GiveApprovalModel.kt | 2 ++ .../features/staking/impl/presentation/model/StakingModel.kt | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/model/GiveApprovalModel.kt b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/model/GiveApprovalModel.kt index 585086e50e..727c03292f 100644 --- a/features/approval/impl/src/main/java/com/tangem/features/approval/impl/model/GiveApprovalModel.kt +++ b/features/approval/impl/src/main/java/com/tangem/features/approval/impl/model/GiveApprovalModel.kt @@ -186,6 +186,8 @@ internal class GiveApprovalModel @Inject constructor( userWallet = userWallet, token = maybeToken.currency, ) + }.onRight { feeExtended -> + approvalTxList = mapOf(approve to feeExtended.transactionFee) } } diff --git a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/model/StakingModel.kt b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/model/StakingModel.kt index f4b678091c..8b4f05de66 100644 --- a/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/model/StakingModel.kt +++ b/features/staking/impl/src/main/java/com/tangem/features/staking/impl/presentation/model/StakingModel.kt @@ -1483,8 +1483,7 @@ internal class StakingModel @Inject constructor( fun getApprovalParams(): GiveApprovalComponent.Params? { val amountState = value.amountState as? AmountState.Data ?: return null - val validatorState = value.validatorState as? StakingStates.ValidatorState.Data ?: return null - val targetAddress = validatorState.chosenTarget.address + val approval = stakingApproval as? StakingApproval.Needed ?: return null val feeCurrencyStatus = feeCryptoCurrencyStatus ?: return null return GiveApprovalComponent.Params( @@ -1492,7 +1491,7 @@ internal class StakingModel @Inject constructor( cryptoCurrencyStatus = cryptoCurrencyStatus, feeCryptoCurrencyStatus = feeCurrencyStatus, amount = amountState.amountTextField.value, - spenderAddress = targetAddress, + spenderAddress = approval.spenderAddress, subtitle = resourceReference( id = R.string.give_permission_staking_subtitle, formatArgs = wrappedList(cryptoCurrencyStatus.currency.symbol),