From 8efa8fc2c6115f9da9d3898dec3e75a3869822e1 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Thu, 18 Apr 2024 17:23:29 -0500 Subject: [PATCH] fix: remove stable node.js API web crypto polyfill --- lib/util.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/util.js b/lib/util.js index 22a14c89..3c6b31c7 100644 --- a/lib/util.js +++ b/lib/util.js @@ -86,12 +86,6 @@ async function validateWebhook(requestData, secret) { */ async function createHMACSHA256(secret, data) { const encoder = new TextEncoder(); - let crypto = globalThis.crypto; - - // In Node 18 the `crypto` global is behind a --no-experimental-global-webcrypto flag - if (typeof crypto === "undefined" && typeof require === "function") { - crypto = require("node:crypto").webcrypto; - } const key = await crypto.subtle.importKey( "raw",