diff --git a/build.gradle.kts b/build.gradle.kts index 116e9dc..1e80619 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -63,7 +63,7 @@ dependencies { testImplementation("io.kotest:kotest-assertions-json:5.5.5") // NftKit - implementation("id.walt:waltid-nftkit:1.2308101426.0") + implementation("id.walt:waltid-nftkit:1.2308121419.0") // HTTP / Client: ktor implementation("io.ktor:ktor-client-core:2.2.4") diff --git a/config/idp-config.json b/config/idp-config.json index 6a9299d..5ad0234 100644 --- a/config/idp-config.json +++ b/config/idp-config.json @@ -109,7 +109,7 @@ "ALGORAND": { "chain": "TESTNET", "factorySmartContractAddress": "", - "smartContractAddress": "266553681", + "smartContractAddress": "GYFVJLKGSWQDHFBHBLABUXYHHSU544RV3WH4ZCF3S6HONSDP73TK4VGY3Y", "collectionPath": "" } } diff --git a/src/main/kotlin/id/walt/idp/nfts/NFTManager.kt b/src/main/kotlin/id/walt/idp/nfts/NFTManager.kt index 5823e65..417c9d1 100644 --- a/src/main/kotlin/id/walt/idp/nfts/NFTManager.kt +++ b/src/main/kotlin/id/walt/idp/nfts/NFTManager.kt @@ -86,9 +86,16 @@ object NFTManager { ChainEcosystem.FLOW -> VerificationService.verifyNftOwnershipInCollectionFlow(tokenConstraint.chain!!, tokenConstraint.smartContractAddress!!,account ,tokenConstraint.collectionPath!!) - ChainEcosystem.ALGORAND -> VerificationService.NFTsAlgorandOwnershipVerification(AlgorandChain.valueOf( - tokenConstraint.chain!!.toString() - ),account,tokenConstraint.smartContractAddress!!) +// ChainEcosystem.ALGORAND -> VerificationService.NFTsAlgorandOwnershipVerification(AlgorandChain.valueOf( +// tokenConstraint.chain!!.toString() +// ),account,tokenConstraint.smartContractAddress!!) + ChainEcosystem.ALGORAND-> AlgorandNftService.verifyOwnerShipBasedOnCreator( + account, + AlgorandChain.valueOf(tokenConstraint.chain!!.toString()), + tokenConstraint.smartContractAddress!!) + else -> false.also { + logger.error { "Collection ownership verification not supported for $ecosystem ecosystem" } + } } } else { println("data nft verification")