Skip to content

Commit

Permalink
NO-TICKET - fix DI for home
Browse files Browse the repository at this point in the history
  • Loading branch information
gslevinkov committed Jun 28, 2023
1 parent cd290a3 commit 6021aac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/org/p2p/wallet/home/HomeModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.p2p.wallet.home.ui.main.bottomsheet.HomeActionsContract
import org.p2p.wallet.home.ui.main.bottomsheet.HomeActionsPresenter
import org.p2p.wallet.home.ui.select.SelectTokenContract
import org.p2p.wallet.home.ui.select.SelectTokenPresenter
import org.p2p.wallet.kyc.model.StrigaKycUiBannerMapper
import org.p2p.wallet.newsend.interactor.SearchInteractor
import org.p2p.wallet.newsend.interactor.SendInteractor
import org.p2p.wallet.newsend.model.NetworkType
Expand Down Expand Up @@ -77,17 +78,18 @@ object HomeModule : InjectionModule {
factory<SelectTokenContract.Presenter> { (tokens: List<Token>) ->
SelectTokenPresenter(tokens)
}
// Cached data exists, therefore creating singleton
singleOf(::UserTokensPolling)
/* Cached data exists, therefore creating singleton */
// todo: do something with this dependenices!
// todo: to eliminate all this hell, we could just migrate to hilt
factoryOf(::HomeInteractor)
factoryOf(::HomePresenterMapper)
factoryOf(::StrigaKycUiBannerMapper)
factory<HomeContract.Presenter> {
val subscribers = listOf(
new(::SplTokenProgramSubscriber),
new(::SolanaAccountUpdateSubscriber)
)
// todo: do something with this dependenices!
// todo: to eliminate all this hell, we could just migrate to hilt
HomePresenter(
homeInteractor = get(),
analytics = get(),
Expand Down

0 comments on commit 6021aac

Please sign in to comment.