Updated on 2026-08-14
This commit is contained in:
commit
8164aa0c1a
1109 changed files with 35558 additions and 15187 deletions
|
|
@ -1,37 +1,11 @@
|
|||
package com.tangem.lib.crypto
|
||||
|
||||
import com.tangem.blockchain.common.Amount
|
||||
import com.tangem.blockchain.common.TransactionExtras
|
||||
import com.tangem.lib.crypto.models.*
|
||||
import com.tangem.lib.crypto.models.transactions.SendTxResult
|
||||
import java.math.BigDecimal
|
||||
import java.math.BigInteger
|
||||
|
||||
interface TransactionManager {
|
||||
|
||||
@Throws(IllegalStateException::class)
|
||||
suspend fun sendApproveTransaction(
|
||||
txData: ApproveTxData,
|
||||
derivationPath: String?,
|
||||
analyticsData: AnalyticsData,
|
||||
): SendTxResult
|
||||
|
||||
/**
|
||||
* Send transaction
|
||||
*
|
||||
* @param txData data to build a tx
|
||||
* @param derivationPath for select right walletManager
|
||||
* @param analyticsData data for send analytics event
|
||||
* @return result of transaction
|
||||
*/
|
||||
@Throws(IllegalStateException::class)
|
||||
suspend fun sendTransaction(
|
||||
txData: SwapTxData,
|
||||
isSwap: Boolean,
|
||||
derivationPath: String?,
|
||||
analyticsData: AnalyticsData,
|
||||
): SendTxResult
|
||||
|
||||
/**
|
||||
* Get fee
|
||||
*
|
||||
|
|
@ -62,8 +36,6 @@ interface TransactionManager {
|
|||
@Throws(IllegalStateException::class)
|
||||
suspend fun updateWalletManager(networkId: String, derivationPath: String?)
|
||||
|
||||
fun calculateFee(networkId: String, gasPrice: String, estimatedGas: Int): BigDecimal
|
||||
|
||||
/**
|
||||
* In app blockchain id, actual in blockchain sdk, not the same as networkId
|
||||
*
|
||||
|
|
@ -74,7 +46,4 @@ interface TransactionManager {
|
|||
|
||||
@Throws(IllegalStateException::class)
|
||||
fun getExplorerTransactionLink(networkId: String, txAddress: String): String
|
||||
|
||||
// TODO: move to another place to use as in Send feature
|
||||
fun getMemoExtras(networkId: String, memo: String?): TransactionExtras?
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
package com.tangem.lib.crypto.models.errors
|
||||
|
||||
class UserCancelledException : Exception()
|
||||
Loading…
Add table
Add a link
Reference in a new issue