Updated on 2026-08-14
This commit is contained in:
parent
ecca7b1f6b
commit
69443deb2a
6 changed files with 49 additions and 23 deletions
|
|
@ -819,18 +819,18 @@ internal class WalletViewModel @Inject constructor(
|
|||
|
||||
private fun openExplorer() {
|
||||
val state = uiState as? WalletState.ContentState ?: return
|
||||
val currencyNetwork = singleWalletCryptoCurrencyStatus?.currency?.network ?: return
|
||||
val currency = singleWalletCryptoCurrencyStatus?.currency ?: return
|
||||
|
||||
viewModelScope.launch(dispatchers.main) {
|
||||
val userWalletId = getWallet(state.walletsListConfig.selectedWalletIndex).walletId
|
||||
|
||||
val addresses = walletManagersFacade.getAddress(userWalletId = userWalletId, network = currencyNetwork)
|
||||
val addresses = walletManagersFacade.getAddress(userWalletId = userWalletId, network = currency.network)
|
||||
|
||||
if (addresses.size == 1) {
|
||||
router.openUrl(
|
||||
url = getExploreUrlUseCase(
|
||||
userWalletId = userWalletId,
|
||||
network = currencyNetwork,
|
||||
currency = currency,
|
||||
addressType = AddressType.Default,
|
||||
),
|
||||
)
|
||||
|
|
@ -848,7 +848,7 @@ internal class WalletViewModel @Inject constructor(
|
|||
onClick = {
|
||||
onAddressTypeSelected(
|
||||
userWalletId = userWalletId,
|
||||
currencyNetwork = currencyNetwork,
|
||||
currency = currency,
|
||||
addressModel = it,
|
||||
)
|
||||
},
|
||||
|
|
@ -860,14 +860,14 @@ internal class WalletViewModel @Inject constructor(
|
|||
|
||||
private fun onAddressTypeSelected(
|
||||
userWalletId: UserWalletId,
|
||||
currencyNetwork: Network,
|
||||
currency: CryptoCurrency,
|
||||
addressModel: AddressModel,
|
||||
) {
|
||||
viewModelScope.launch(dispatchers.main) {
|
||||
router.openUrl(
|
||||
url = getExploreUrlUseCase(
|
||||
userWalletId = userWalletId,
|
||||
network = currencyNetwork,
|
||||
currency = currency,
|
||||
addressType = AddressType.valueOf(addressModel.type.name),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue