Updated on 2026-08-14

This commit is contained in:
Tangem 2023-01-23 17:01:05 +03:00
parent 8f78031374
commit 2756dc5687
24 changed files with 843 additions and 314 deletions

View file

@ -7,16 +7,26 @@ import java.math.BigDecimal
interface TransactionManager {
@Throws(IllegalStateException::class)
suspend fun sendApproveTransaction(
networkId: String,
feeAmount: BigDecimal,
estimatedGas: Int,
destinationAddress: String,
dataToSign: String,
): SendTxResult
@Suppress("LongParameterList")
@Throws(IllegalStateException::class)
suspend fun sendTransaction(
networkId: String,
amountToSend: BigDecimal,
currencyToSend: Currency,
feeAmount: BigDecimal,
estimatedGas: Int,
destinationAddress: String,
dataToSign: String,
isSwap: Boolean,
currencyToSend: Currency,
): SendTxResult
@Throws(IllegalStateException::class)
@ -30,5 +40,8 @@ interface TransactionManager {
@Throws(IllegalStateException::class)
fun getNativeTokenDecimals(networkId: String): Int
@Throws(IllegalStateException::class)
suspend fun updateWalletManager(networkId: String)
fun calculateFee(networkId: String, gasPrice: String, estimatedGas: Int): BigDecimal
}

View file

@ -49,6 +49,10 @@ interface UserWalletManager {
@Throws(IllegalStateException::class)
fun getCurrentWalletTokensBalance(networkId: String): Map<String, ProxyAmount>
fun getNativeTokenBalance(networkId: String): ProxyAmount?
fun getNetworkCurrency(networkId: String): String
/**
* Returns selected app currency
*/