Updated on 2026-08-14
This commit is contained in:
parent
81bf5d57c9
commit
71e3159e38
2 changed files with 19 additions and 6 deletions
|
|
@ -393,6 +393,7 @@ internal class SwapInteractorImpl @Inject constructor(
|
|||
warnings = warnings,
|
||||
fromToken = fromToken,
|
||||
amount = amount,
|
||||
feeState = feeState,
|
||||
userWalletId = userWalletId,
|
||||
minAdaValue = minAdaValue,
|
||||
)
|
||||
|
|
@ -478,12 +479,24 @@ internal class SwapInteractorImpl @Inject constructor(
|
|||
warnings: MutableList<Warning>,
|
||||
fromToken: CryptoCurrency,
|
||||
amount: SwapAmount,
|
||||
feeState: TxFeeState,
|
||||
userWalletId: UserWalletId,
|
||||
minAdaValue: BigDecimal?,
|
||||
) {
|
||||
val fee = Fee.Common(
|
||||
amount = Amount(
|
||||
value = when (feeState) {
|
||||
TxFeeState.Empty -> BigDecimal.ZERO
|
||||
is TxFeeState.MultipleFeeState -> feeState.normalFee.feeValue
|
||||
is TxFeeState.SingleFeeState -> feeState.fee.feeValue
|
||||
},
|
||||
blockchain = Blockchain.fromId(fromToken.network.id.value),
|
||||
),
|
||||
)
|
||||
|
||||
transactionRepository.validateTransaction(
|
||||
amount = amount.value.convertToAmount(fromToken),
|
||||
fee = null,
|
||||
fee = fee,
|
||||
memo = null,
|
||||
txExtras = null,
|
||||
destination = getTokenAddress(fromToken),
|
||||
|
|
@ -1260,10 +1273,10 @@ internal class SwapInteractorImpl @Inject constructor(
|
|||
swapState.copy(
|
||||
permissionState = PermissionDataState.Empty,
|
||||
warnings = manageWarnings(
|
||||
fromToken,
|
||||
amount,
|
||||
txFeeState,
|
||||
(feeData as? ProxyFees.SingleFee)?.let {
|
||||
fromTokenStatus = fromToken,
|
||||
amount = amount,
|
||||
feeState = txFeeState,
|
||||
minAdaValue = (feeData as? ProxyFees.SingleFee)?.let {
|
||||
(it.singleFee as? ProxyFee.CardanoToken)?.minAdaValue
|
||||
},
|
||||
),
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ markdown = "0.7.2"
|
|||
# endregion Other libraries
|
||||
|
||||
# region Tangem
|
||||
tangemBlockchainSdk = "release-app_5.12-682"
|
||||
tangemBlockchainSdk = "release-app_5.12-683"
|
||||
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
||||
tangemCardSdk = "release-app_5.12-364"
|
||||
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue