Updated on 2026-08-14

This commit is contained in:
Tangem 2023-06-13 09:27:20 +03:00
parent 3a9073f9f2
commit 72256ab5c5
4 changed files with 9 additions and 10 deletions

View file

@ -86,7 +86,7 @@ class WalletConnectSdkHelper {
val transactionData = TransactionData(
amount = Amount(value, wallet.blockchain),
fee = Fee(Amount(fee, wallet.blockchain)),
fee = Fee.CommonFee(Amount(fee, wallet.blockchain)),
sourceAddress = transaction.from,
destinationAddress = transaction.to!!,
extras = EthereumTransactionExtras(

View file

@ -90,9 +90,9 @@ class DemoTransactionSender(private val walletManager: WalletManager) : Transact
val blockchain = walletManager.wallet.blockchain
return Result.Success(
TransactionFee.Choosable(
minimum = Fee(Amount(minimumFee, blockchain)),
normal = Fee(Amount(normalFee, blockchain)),
priority = Fee(Amount(priorityFee, blockchain))
minimum = Fee.CommonFee(Amount(minimumFee, blockchain)),
normal = Fee.CommonFee(Amount(normalFee, blockchain)),
priority = Fee.CommonFee(Amount(priorityFee, blockchain))
)
)
}

View file

@ -140,7 +140,7 @@ class GnosisRegistrator(
val compiledEthereumTransaction = walletManager.transactionBuilder.buildApproveToSign(
transactionData = walletManager.createTransaction(
amount = approveAmount,
fee = Fee(feeAmount),
fee = Fee.CommonFee(feeAmount),
destination = otpProcessorContractAddress,
),
nonce = atomicNonce.getAndIncrement().toBigInteger(),

View file

@ -6,7 +6,6 @@ import com.tangem.blockchain.blockchains.ethereum.EthereumTransactionExtras
import com.tangem.blockchain.blockchains.ethereum.EthereumWalletManager
import com.tangem.blockchain.blockchains.optimism.OptimismWalletManager
import com.tangem.blockchain.common.*
import com.tangem.blockchain.common.transaction.EthereumFeeExtras
import com.tangem.blockchain.common.transaction.Fee
import com.tangem.blockchain.common.transaction.TransactionFee
import com.tangem.blockchain.extensions.Result
@ -101,7 +100,7 @@ class TransactionManagerImpl(
): SendTxResult {
val txData = walletManager.createTransaction(
amount = amount,
fee = Fee(Amount(value = feeAmount, blockchain = blockchain)),
fee = Fee.CommonFee(Amount(value = feeAmount, blockchain = blockchain)),
destination = destinationAddress,
).copy(hash = dataToSign, extras = createExtras(walletManager, gasLimit, dataToSign))
@ -283,15 +282,15 @@ class TransactionManagerImpl(
val choosableFee = fee.data
val minProxyFee = ProxyFee(
gasLimit = (choosableFee.minimum.extras as EthereumFeeExtras).gasLimit,
gasLimit = (choosableFee.minimum as Fee.EthereumFee).gasLimit,
fee = convertToProxyAmount(amount = choosableFee.minimum.amount),
)
val normalProxyFee = ProxyFee(
gasLimit = (choosableFee.normal.extras as EthereumFeeExtras).gasLimit,
gasLimit = (choosableFee.normal as Fee.EthereumFee).gasLimit,
fee = convertToProxyAmount(amount = choosableFee.normal.amount),
)
val priorityProxyFee = ProxyFee(
gasLimit = (choosableFee.priority.extras as EthereumFeeExtras).gasLimit,
gasLimit = (choosableFee.priority as Fee.EthereumFee).gasLimit,
fee = convertToProxyAmount(amount = choosableFee.priority.amount),
)