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),