Updated on 2026-08-14
This commit is contained in:
parent
05d2286ed7
commit
a38bc0322d
7 changed files with 107 additions and 60 deletions
|
|
@ -92,11 +92,7 @@ class TapWalletManager(
|
|||
store.dispatchWalletAction(action = WalletAction.Warnings.CheckIfNeeded)
|
||||
}
|
||||
setupWalletConnectV2(userWallet)
|
||||
|
||||
val walletFeatureToggles = store.state.daggerGraphState.get(DaggerGraphState::walletFeatureToggles)
|
||||
if (!walletFeatureToggles.isRedesignedScreenEnabled) {
|
||||
loadData(userWallet = userWallet, refresh = refresh)
|
||||
}
|
||||
loadData(userWallet = userWallet, refresh = refresh)
|
||||
}
|
||||
|
||||
private fun Store<AppState>.dispatchWalletAction(action: WalletAction) {
|
||||
|
|
@ -161,21 +157,31 @@ class TapWalletManager(
|
|||
}
|
||||
}
|
||||
|
||||
private fun getAccountsForWc(wcInteractor: WalletConnectInteractor): List<Account> {
|
||||
return store.state.walletState.walletManagers
|
||||
.mapNotNull {
|
||||
val wallet = it.wallet
|
||||
val chainId = wcInteractor.blockchainHelper.networkIdToChainIdOrNull(
|
||||
wallet.blockchain.toNetworkId(),
|
||||
private suspend fun getAccountsForWc(wcInteractor: WalletConnectInteractor): List<Account> {
|
||||
val walletManagerToggles = store.state.daggerGraphState
|
||||
.get(DaggerGraphState::walletFeatureToggles)
|
||||
val walletManagers = if (walletManagerToggles.isRedesignedScreenEnabled) {
|
||||
val walletManagerFacade = store.state.daggerGraphState
|
||||
.get(DaggerGraphState::walletManagersFacade)
|
||||
val userWallet = userWalletsListManager.selectedUserWalletSync ?: return emptyList()
|
||||
walletManagerFacade.getStoredWalletManagers(userWallet.walletId)
|
||||
} else {
|
||||
store.state.walletState.walletManagers
|
||||
}
|
||||
|
||||
return walletManagers.mapNotNull {
|
||||
val wallet = it.wallet
|
||||
val chainId = wcInteractor.blockchainHelper.networkIdToChainIdOrNull(
|
||||
wallet.blockchain.toNetworkId(),
|
||||
)
|
||||
chainId?.let {
|
||||
Account(
|
||||
chainId,
|
||||
wallet.address,
|
||||
wallet.publicKey.derivationPath?.rawPath,
|
||||
)
|
||||
chainId?.let {
|
||||
Account(
|
||||
chainId,
|
||||
wallet.address,
|
||||
wallet.publicKey.derivationPath?.rawPath,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun updateConfigManager(data: ScanResponse) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue