Updated on 2026-08-14
This commit is contained in:
parent
ecca7b1f6b
commit
69443deb2a
6 changed files with 49 additions and 23 deletions
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.domain.wallets.usecase
|
||||
|
||||
import arrow.core.raise.catch
|
||||
import com.tangem.domain.tokens.model.Network
|
||||
import com.tangem.blockchain.common.address.AddressType
|
||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||
import com.tangem.domain.walletmanager.WalletManagersFacade
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
|
||||
|
|
@ -12,11 +12,19 @@ class GetExploreUrlUseCase(private val walletsManagersFacade: WalletManagersFaca
|
|||
// FIXME: Handle error
|
||||
suspend operator fun invoke(
|
||||
userWalletId: UserWalletId,
|
||||
network: Network,
|
||||
currency: CryptoCurrency,
|
||||
addressType: AddressType = AddressType.Default,
|
||||
): String {
|
||||
return catch({ walletsManagersFacade.getExploreUrl(userWalletId, network, addressType) }) {
|
||||
""
|
||||
}
|
||||
return catch(
|
||||
block = {
|
||||
walletsManagersFacade.getExploreUrl(
|
||||
userWalletId = userWalletId,
|
||||
network = currency.network,
|
||||
addressType = addressType,
|
||||
contractAddress = (currency as? CryptoCurrency.Token)?.contractAddress,
|
||||
)
|
||||
},
|
||||
catch = { "" }
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue