Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-23 20:21:48 +05:00
parent 043602ebd6
commit dd362fb32c
21 changed files with 133 additions and 184 deletions

View file

@ -317,7 +317,7 @@ internal class SendConfirmModel @Inject constructor(
null
}
val amount = receivingAmount?.convertToSdkAmount(cryptoCurrency)
val amount = receivingAmount?.convertToSdkAmount(cryptoCurrencyStatus)
saveBlockchainErrorUseCase(
error = BlockchainErrorInfo(
@ -331,7 +331,7 @@ internal class SendConfirmModel @Inject constructor(
""
},
amount = amount?.value?.stripZeroPlainString() ?: "unknown",
fee = feeValue?.convertToSdkAmount(cryptoCurrency)
fee = feeValue?.convertToSdkAmount(cryptoCurrencyStatus)
?.value?.stripZeroPlainString() ?: "unknown",
),
)
@ -424,7 +424,7 @@ internal class SendConfirmModel @Inject constructor(
modelScope.launch {
createTransferTransactionUseCase(
amount = receivingAmount.convertToSdkAmount(cryptoCurrency),
amount = receivingAmount.convertToSdkAmount(cryptoCurrencyStatus),
fee = fee,
memo = memo,
nonce = nonce,

View file

@ -260,10 +260,11 @@ internal class SendModel @Inject constructor(
suspend fun loadFee(): Either<GetFeeError, TransactionFee> {
val predefinedValues = predefinedValues
val cryptoCurrencyStatus = cryptoCurrencyStatusFlow.value
val transferTransaction = if (predefinedValues is PredefinedValues.Content.Deeplink) {
val predefinedAmount = predefinedValues.amount.parseBigDecimalOrNull()?.convertToSdkAmount(cryptoCurrency)
val predefinedAmount = predefinedValues.amount.parseBigDecimalOrNull()
createTransferTransactionUseCase(
amount = predefinedAmount ?: error("Invalid amount"),
amount = predefinedAmount?.convertToSdkAmount(cryptoCurrencyStatus) ?: error("Invalid amount"),
memo = predefinedValues.memo,
destination = predefinedValues.address,
userWalletId = userWallet.walletId,
@ -277,7 +278,7 @@ internal class SendModel @Inject constructor(
val enteredAmount = amountUM.amountTextField.cryptoAmount.value ?: error("Invalid amount")
createTransferTransactionUseCase(
amount = enteredAmount.convertToSdkAmount(cryptoCurrency),
amount = enteredAmount.convertToSdkAmount(cryptoCurrencyStatus),
memo = enteredMemo,
destination = enteredDestinationAddress,
userWalletId = userWallet.walletId,

View file

@ -287,7 +287,7 @@ internal class NotificationsModel @Inject constructor(
) {
val validationError = validateTransactionUseCase(
userWalletId = userWalletId,
amount = enteredAmount.convertToSdkAmount(currency),
amount = enteredAmount.convertToSdkAmount(cryptoCurrencyStatus),
fee = fee,
memo = memo,
destination = destinationAddress,