Updated on 2026-08-14
This commit is contained in:
parent
96aebcdba2
commit
8ceb291435
23 changed files with 626 additions and 228 deletions
|
|
@ -12,13 +12,13 @@ class DefaultWalletAddressServiceRepository(
|
|||
) : WalletAddressServiceRepository {
|
||||
override suspend fun validate(userWalletId: UserWalletId, network: Network, address: String): Boolean {
|
||||
val blockchain = Blockchain.fromId(network.id.value)
|
||||
val walletManager = walletManagersFacade.getOrCreateWalletManager(
|
||||
userWalletId = userWalletId,
|
||||
blockchain = blockchain,
|
||||
derivationPath = network.derivationPath.value,
|
||||
) ?: return false
|
||||
|
||||
return if (blockchain.isNear()) {
|
||||
val walletManager = walletManagersFacade.getOrCreateWalletManager(
|
||||
userWalletId = userWalletId,
|
||||
blockchain = blockchain,
|
||||
derivationPath = network.derivationPath.value,
|
||||
) ?: return false
|
||||
(walletManager as? NearWalletManager)?.validateAddress(address) ?: false
|
||||
} else {
|
||||
blockchain.validateAddress(address)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue