From 1fb6496e878c2c4428488f041151e7188eb77c0f Mon Sep 17 00:00:00 2001 From: Will Hester Date: Thu, 18 Jul 2024 10:39:31 +0100 Subject: [PATCH] update --- go/enclave/rpc/vk_utils.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/go/enclave/rpc/vk_utils.go b/go/enclave/rpc/vk_utils.go index d486153a4f..b5546a8955 100644 --- a/go/enclave/rpc/vk_utils.go +++ b/go/enclave/rpc/vk_utils.go @@ -64,24 +64,6 @@ func WithVKEncryption[P any, R any]( if err := json.Unmarshal(plaintextRequest, &decodedRequest); err != nil { return responses.AsPlaintextError(fmt.Errorf("could not unmarshal params - %w", err)), nil } - for _, param := range decodedRequest.Params { - fmt.Printf("Decoded param: %s\n", param) - } - - //// checkViewingKeyAndRecoverAddress checks the signature and recovers the address from the viewing key - //func checkViewingKeyAndRecoverAddress(vk *AuthenticatedViewingKey, chainID int64) (*gethcommon.Address, error) { - // // get userID from viewingKey public key - // userID := viewingkey.CalculateUserID(vk.rpcVK.PublicKey) - // vk.UserID = userID - // - // // check the signature and recover the address assuming the message was signed with EIP712 - // recoveredSignerAddress, err := viewingkey.CheckSignature(userID, vk.rpcVK.SignatureWithAccountKey, chainID, vk.rpcVK.SignatureType) - // if err != nil { - // return nil, fmt.Errorf("signature verification failed %w", err) - // } - // - // return recoveredSignerAddress, err - //} userId := viewingkey.CalculateUserID(decodedRequest.VK.PublicKey) recoveredSignerAddress, _ := viewingkey.CheckSignature(userId, decodedRequest.VK.SignatureWithAccountKey, 1337, decodedRequest.VK.SignatureType)