Updated on 2026-08-14

This commit is contained in:
Tangem 2022-06-02 12:46:33 +03:00
commit 7d39bcef97
4 changed files with 12 additions and 5 deletions

@ -1 +1 @@
Subproject commit 64ae04d2086e5a605dd4da3cba4af32a60d46c79
Subproject commit 7f058ec409b4eaaf8688ecd4bf944ef8d58d3564

View file

@ -21,6 +21,9 @@ sealed class TokensAction : Action {
object Failure : TokensAction()
}
data class LoadMore(val scanResponse: ScanResponse? = null
) : TokensAction()
data class SetAddedCurrencies(
val wallets: List<WalletData>, val derivationStyle: DerivationStyle?
) : TokensAction()

View file

@ -53,7 +53,13 @@ class TokensMiddleware {
action.searchInput
)
}
is TokensAction.LoadMore -> {
if (store.state.tokensState.needToLoadMore
&& store.state.tokensState.currencies.isNotEmpty()
) {
handleLoadCurrencies(action.scanResponse)
}
}
}
next(action)
}

View file

@ -84,13 +84,11 @@ class AddTokensFragment : Fragment(R.layout.fragment_add_tokens),
}
val onLoadMore = {
if (store.state.tokensState.needToLoadMore) {
store.dispatch(
TokensAction.LoadCurrencies(
TokensAction.LoadMore(
scanResponse = store.state.globalState.scanResponse
)
)
}
}
cvCurrencies.setContent {