Updated on 2026-08-14
This commit is contained in:
parent
5cc1aa7ce8
commit
c9917f1c05
8 changed files with 128 additions and 81 deletions
|
|
@ -6,6 +6,7 @@ import com.tangem.blockchain.common.TransactionSender
|
|||
import com.tangem.blockchain.common.TransactionSigner
|
||||
import com.tangem.blockchain.common.WalletManager
|
||||
import com.tangem.blockchain.common.toBlockchainSdkError
|
||||
import com.tangem.blockchain.common.transaction.TransactionFee
|
||||
import com.tangem.blockchain.extensions.Result
|
||||
import com.tangem.blockchain.extensions.SimpleResult
|
||||
import com.tangem.common.CompletionResult
|
||||
|
|
@ -84,14 +85,14 @@ object DemoHelper {
|
|||
|
||||
class DemoTransactionSender(private val walletManager: WalletManager) : TransactionSender {
|
||||
|
||||
override suspend fun getFee(amount: Amount, destination: String): Result<List<Amount>> {
|
||||
override suspend fun getFee(amount: Amount, destination: String): Result<TransactionFee> {
|
||||
val blockchain = walletManager.wallet.blockchain
|
||||
return Result.Success(
|
||||
listOf(
|
||||
Amount(0.0001.toBigDecimal(), blockchain),
|
||||
Amount(0.0002.toBigDecimal(), blockchain),
|
||||
Amount(0.0003.toBigDecimal(), blockchain),
|
||||
),
|
||||
TransactionFee.Choosable(
|
||||
minimum = Amount(0.0001.toBigDecimal(), blockchain),
|
||||
normal = Amount(0.0002.toBigDecimal(), blockchain),
|
||||
priority = Amount(0.0003.toBigDecimal(), blockchain)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue