protected static DecryptedRequest DecryptRequest(RequestObject request, WalletController walletController)
        {
            byte[] decrypted = VCL.Decrypt(request.CipherV2Bytes.FromBase64(), request.CurrentPublicKey.FromBase64(), VCL.ECKeyPair.PrivateKey, AuthKey.PrivateKey);
            if (decrypted == null)
            {
                throw new X1WalletException((HttpStatusCode)427, "Public key changed - please reload", null);
            }
            string           json             = decrypted.FromUTF8Bytes();
            DecryptedRequest decryptedRequest = JsonConvert.DeserializeObject <DecryptedRequest>(json);

            if (((IList)CommandsWithoutWalletNameCheck).Contains(decryptedRequest.Command))
            {
                return(decryptedRequest);
            }
            if (decryptedRequest.Target == null)
            {
                throw new X1WalletException(HttpStatusCode.BadRequest, "No wallet name was supplied.");
            }
            walletController.SetWalletName(decryptedRequest.Target.Replace($".{walletController.CoinTicker}{X1WalletFile.FileExtension}", ""));
            return(decryptedRequest);
        }