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

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