From 40d1974a9df53ba9cdfdb0138a51eb0a18460750 Mon Sep 17 00:00:00 2001 From: walid Date: Thu, 16 Mar 2023 11:18:30 +0100 Subject: [PATCH] Fix ecosystem chain transformation --- config/idp-config.json | 8 ++++---- src/main/kotlin/id/walt/idp/nfts/NFTController.kt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/idp-config.json b/config/idp-config.json index fbc1d08..d11f55c 100644 --- a/config/idp-config.json +++ b/config/idp-config.json @@ -72,14 +72,14 @@ "ecosystems": [ "EVM", "TEZOS", "NEAR" ], "nftTokenContraints": { "EVM": { - "chain": "TESTNET", + "chain": "POLYGON", "factorySmartContractAddress": "", - "smartContractAddress": "demo.khaled_lightency1.testnet" + "smartContractAddress": "0x21dd9b1913d84ab295fdf19834b0b6824a5912ca" }, "TEZOS": { - "chain": "TESTNET", + "chain": "GHOSTNET", "factorySmartContractAddress": "", - "smartContractAddress": "demo.khaled_lightency1.testnet" + "smartContractAddress": "KT1Rc59ukgW32e54aUdYqVzTM9gtHrA4JDYp" }, "NEAR": { "chain": "TESTNET", diff --git a/src/main/kotlin/id/walt/idp/nfts/NFTController.kt b/src/main/kotlin/id/walt/idp/nfts/NFTController.kt index e637d36..817c110 100644 --- a/src/main/kotlin/id/walt/idp/nfts/NFTController.kt +++ b/src/main/kotlin/id/walt/idp/nfts/NFTController.kt @@ -44,7 +44,7 @@ object NFTController { val sessionId = ctx.queryParam("session") ?: throw BadRequestResponse("Session not specified") val message = ctx.queryParam("message") ?: throw BadRequestResponse("Message not specified") val signature = ctx.queryParam("signature") ?: throw BadRequestResponse("Signature not specified") - val ecosystem = ctx.queryParam("ecosystem")?.let { ChainEcosystem.valueOf(it) } ?: throw BadRequestResponse("Ecosystem not specified") + val ecosystem = ctx.queryParam("ecosystem")?.let { ChainEcosystem.valueOf(it.toUpperCase()) } ?: throw BadRequestResponse("Ecosystem not specified") val session = OIDCManager.getOIDCSession(sessionId)