Updated on 2026-08-14
This commit is contained in:
parent
ef30b51f10
commit
34393ef5e6
11 changed files with 89 additions and 9 deletions
|
|
@ -0,0 +1,13 @@
|
|||
package com.tangem.data.transaction
|
||||
|
||||
import com.tangem.blockchain.common.AmountType
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.domain.tokens.model.Network
|
||||
import com.tangem.domain.transaction.FeeRepository
|
||||
|
||||
internal class DefaultFeeRepository : FeeRepository {
|
||||
override fun isFeeApproximate(networkId: Network.ID, amountType: AmountType): Boolean {
|
||||
val blockchain = Blockchain.fromId(networkId.value)
|
||||
return blockchain.isFeeApproximate(amountType)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
package com.tangem.data.transaction.di
|
||||
|
||||
import com.tangem.data.transaction.DefaultFeeRepository
|
||||
import com.tangem.data.transaction.DefaultTransactionRepository
|
||||
import com.tangem.domain.transaction.FeeRepository
|
||||
import com.tangem.domain.transaction.TransactionRepository
|
||||
import com.tangem.domain.walletmanager.WalletManagersFacade
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
|
|
@ -25,4 +27,10 @@ internal object TransactionDataModule {
|
|||
coroutineDispatcherProvider = coroutineDispatcherProvider,
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun providesFeeRepository(): FeeRepository {
|
||||
return DefaultFeeRepository()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue