Updated on 2026-08-14
This commit is contained in:
parent
aea7f5f415
commit
c83ce2ada3
53 changed files with 1062 additions and 238 deletions
|
|
@ -667,7 +667,7 @@ class DefaultWalletManagersFacade(
|
|||
return walletManager.getAssets(address, collectionIdentifier)
|
||||
}
|
||||
|
||||
override suspend fun getAsset(
|
||||
override suspend fun getNFTAsset(
|
||||
userWalletId: UserWalletId,
|
||||
network: Network,
|
||||
collectionIdentifier: NFTCollection.Identifier,
|
||||
|
|
@ -682,6 +682,21 @@ class DefaultWalletManagersFacade(
|
|||
return walletManager.getAsset(collectionIdentifier, assetIdentifier)
|
||||
}
|
||||
|
||||
override suspend fun getNFTSalePrice(
|
||||
userWalletId: UserWalletId,
|
||||
network: Network,
|
||||
collectionIdentifier: NFTCollection.Identifier,
|
||||
assetIdentifier: NFTAsset.Identifier,
|
||||
): NFTAsset.SalePrice? {
|
||||
val blockchain = Blockchain.fromId(network.id.value)
|
||||
val walletManager = getOrCreateWalletManager(
|
||||
userWalletId = userWalletId,
|
||||
blockchain = blockchain,
|
||||
derivationPath = network.derivationPath.value,
|
||||
) ?: return null
|
||||
return walletManager.getSalePrice(collectionIdentifier, assetIdentifier)
|
||||
}
|
||||
|
||||
override suspend fun isAccountInitialized(userWalletId: UserWalletId, network: Network): Boolean {
|
||||
val walletManager = getOrCreateWalletManager(userWalletId = userWalletId, network = network)
|
||||
val initializableAccountWalletManger = walletManager as? InitializableAccount ?: return true
|
||||
|
|
|
|||
|
|
@ -259,13 +259,20 @@ interface WalletManagersFacade {
|
|||
collectionIdentifier: NFTCollection.Identifier,
|
||||
): List<NFTAsset>
|
||||
|
||||
suspend fun getAsset(
|
||||
suspend fun getNFTAsset(
|
||||
userWalletId: UserWalletId,
|
||||
network: Network,
|
||||
collectionIdentifier: NFTCollection.Identifier,
|
||||
assetIdentifier: NFTAsset.Identifier,
|
||||
): NFTAsset?
|
||||
|
||||
suspend fun getNFTSalePrice(
|
||||
userWalletId: UserWalletId,
|
||||
network: Network,
|
||||
collectionIdentifier: NFTCollection.Identifier,
|
||||
assetIdentifier: NFTAsset.Identifier,
|
||||
): NFTAsset.SalePrice?
|
||||
|
||||
/**
|
||||
* If wallet manager implements [InitializableAccount] then returns [InitializableAccount.isAccountInitialized]
|
||||
* value. Otherwise always return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue