Skip to content

Commit

Permalink
Patch @spruceid+siwe-parser to fix SIWE detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuri committed Feb 3, 2025
1 parent ef3b5d1 commit d320960
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
"sha256-uint8array": "0.10.3",
"express": "4.21.2",
"nanoid": "^3.3.8",
"undici": "5.28.5"
"undici": "5.28.5",
"@spruceid/siwe-parser@npm:2.1.0": "patches/@spruceid+siwe-parser+2.1.0.patch"
},
"dependencies": {
"@config-plugins/detox": "^8.0.0",
Expand Down
28 changes: 28 additions & 0 deletions patches/@spruceid+siwe-parser+2.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/node_modules/@spruceid/siwe-parser/dist/abnf.js b/node_modules/@spruceid/siwe-parser/dist/abnf.js
index 15caf98..0eeac1e 100644
--- a/node_modules/@spruceid/siwe-parser/dist/abnf.js
+++ b/node_modules/@spruceid/siwe-parser/dist/abnf.js
@@ -290,9 +290,6 @@ class ParsedMessage {
if (this.domain.length === 0) {
throw new Error("Domain cannot be empty.");
}
- if (!(0, utils_1.isEIP55Address)(this.address)) {
- throw new Error("Address not conformant to EIP-55.");
- }
}
}
exports.ParsedMessage = ParsedMessage;
diff --git a/node_modules/@spruceid/siwe-parser/dist/regex.js b/node_modules/@spruceid/siwe-parser/dist/regex.js
index 4740a7c..f1d880d 100644
--- a/node_modules/@spruceid/siwe-parser/dist/regex.js
+++ b/node_modules/@spruceid/siwe-parser/dist/regex.js
@@ -55,9 +55,6 @@ class ParsedMessage {
throw new Error("Domain cannot be empty.");
}
this.address = (_b = match === null || match === void 0 ? void 0 : match.groups) === null || _b === void 0 ? void 0 : _b.address;
- if (!(0, utils_1.isEIP55Address)(this.address)) {
- throw new Error("Address not conformant to EIP-55.");
- }
this.statement = (_c = match === null || match === void 0 ? void 0 : match.groups) === null || _c === void 0 ? void 0 : _c.statement;
this.uri = (_d = match === null || match === void 0 ? void 0 : match.groups) === null || _d === void 0 ? void 0 : _d.uri;
if (!uri.isUri(this.uri)) {

0 comments on commit d320960

Please sign in to comment.