diff --git a/src/main/kotlin/id/walt/idp/nfts/NFTController.kt b/src/main/kotlin/id/walt/idp/nfts/NFTController.kt index 25aba1b..baedaf8 100644 --- a/src/main/kotlin/id/walt/idp/nfts/NFTController.kt +++ b/src/main/kotlin/id/walt/idp/nfts/NFTController.kt @@ -94,7 +94,7 @@ object NFTController { } ChainEcosystem.ALGORAND -> { - address = SiwaManager.getAddress(message) + address = SiwaManager.getPublicKey(message) val publicKey = SiwaManager.getPublicKey(message) SiwaManager.verifySignature(session!!, message, publicKey,signature) } diff --git a/src/main/kotlin/id/walt/idp/siwe/siwaManager.kt b/src/main/kotlin/id/walt/idp/siwe/siwaManager.kt index ad68a18..69e37ca 100644 --- a/src/main/kotlin/id/walt/idp/siwe/siwaManager.kt +++ b/src/main/kotlin/id/walt/idp/siwe/siwaManager.kt @@ -50,12 +50,7 @@ object SiwaManager { - fun getAddress(message:String): String{ - val regex = Regex("Public Key: ([A-Z0-9]+)\\s*\\.\\s*Date:") - val matchResult = regex.find(message) - val publicKey = matchResult?.groupValues?.get(1) - return publicKey!! - } + fun getNonce(message: String): String{ val nonce= message.split(".").last().split(":").last().trim()