Skip to content

Commit

Permalink
Merge pull request #65 from walt-id/feat/Algorand-changes
Browse files Browse the repository at this point in the history
Feat/algorand changes
  • Loading branch information
SuperBatata authored Aug 13, 2023
2 parents 8d6fbae + a6cd1c1 commit 5458d2b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion config/idp-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"ALGORAND": {
"chain": "TESTNET",
"factorySmartContractAddress": "",
"smartContractAddress": "266553681",
"smartContractAddress": "GYFVJLKGSWQDHFBHBLABUXYHHSU544RV3WH4ZCF3S6HONSDP73TK4VGY3Y",
"collectionPath": ""
}
}
Expand Down
13 changes: 10 additions & 3 deletions src/main/kotlin/id/walt/idp/nfts/NFTManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5458d2b

Please sign in to comment.