Skip to content

Commit

Permalink
Patch ethereum-cryptography-1.1.2 to work with ncc
Browse files Browse the repository at this point in the history
  • Loading branch information
krebernisak committed Oct 3, 2022
1 parent d7bb321 commit 0c23bd5
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
17 changes: 17 additions & 0 deletions .yarn/patches/ethereum-cryptography-npm-1.1.2-c16cfd7e8a.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/utils.js b/utils.js
index 48dac71e25592c1060017080abd97b6a8790a2ba..4732516f982a9cf6b2708db2f1d823c69c4636cc 100644
--- a/utils.js
+++ b/utils.js
@@ -54,10 +54,9 @@ exports.wrapHash = wrapHash;
exports.crypto = (() => {
const webCrypto = typeof self === "object" && "crypto" in self ? self.crypto : undefined;
const nodeRequire = typeof module !== "undefined" &&
- typeof module.require === "function" &&
- module.require.bind(module);
+ typeof module.require === "function";
return {
- node: nodeRequire && !webCrypto ? nodeRequire("crypto") : undefined,
+ node: nodeRequire && !webCrypto ? require("crypto") : undefined,
web: webCrypto
};
})();
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,9 @@
"lint-staged": {
"*.{js,css,md,ts,json,yml,yaml}": "prettier --write"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"resolutions": {
"ethereum-cryptography@^1.1.2": "patch:ethereum-cryptography@npm%3A1.1.2#./.yarn/patches/ethereum-cryptography-npm-1.1.2-c16cfd7e8a.patch",
"ethereum-cryptography@^1.0.3": "patch:ethereum-cryptography@npm%3A1.1.2#./.yarn/patches/ethereum-cryptography-npm-1.1.2-c16cfd7e8a.patch"
}
}
18 changes: 15 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15153,6 +15153,18 @@ __metadata:
languageName: node
linkType: hard

"ethereum-cryptography@npm:1.1.2":
version: 1.1.2
resolution: "ethereum-cryptography@npm:1.1.2"
dependencies:
"@noble/hashes": 1.1.2
"@noble/secp256k1": 1.6.3
"@scure/bip32": 1.1.0
"@scure/bip39": 1.1.0
checksum: 0ef55f141acad45b1ba1db58ce3d487155eb2d0b14a77b3959167a36ad324f46762873257def75e7f00dbe8ac78aabc323d2207830f85e63a42a1fb67063a6ba
languageName: node
linkType: hard

"ethereum-cryptography@npm:^0.1.3":
version: 0.1.3
resolution: "ethereum-cryptography@npm:0.1.3"
Expand All @@ -15176,15 +15188,15 @@ __metadata:
languageName: node
linkType: hard

"ethereum-cryptography@npm:^1.0.3":
"ethereum-cryptography@patch:ethereum-cryptography@npm%3A1.1.2#./.yarn/patches/ethereum-cryptography-npm-1.1.2-c16cfd7e8a.patch::locator=%40chainlink%2Fexternal-adapters-js%40workspace%3A.":
version: 1.1.2
resolution: "ethereum-cryptography@npm:1.1.2"
resolution: "ethereum-cryptography@patch:ethereum-cryptography@npm%3A1.1.2#./.yarn/patches/ethereum-cryptography-npm-1.1.2-c16cfd7e8a.patch::version=1.1.2&hash=e0408b&locator=%40chainlink%2Fexternal-adapters-js%40workspace%3A."
dependencies:
"@noble/hashes": 1.1.2
"@noble/secp256k1": 1.6.3
"@scure/bip32": 1.1.0
"@scure/bip39": 1.1.0
checksum: 0ef55f141acad45b1ba1db58ce3d487155eb2d0b14a77b3959167a36ad324f46762873257def75e7f00dbe8ac78aabc323d2207830f85e63a42a1fb67063a6ba
checksum: 58355969c5c5d2a23d4160c5b2b9701923ce316e24f64c1720593b56f6be26678c5584742e5593e905002cc17f92d3b278f722899e3d521301c567650c0456e9
languageName: node
linkType: hard

Expand Down

0 comments on commit 0c23bd5

Please sign in to comment.