wolverine-ai 5.0.3 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wolverine-ai",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "Self-healing Node.js server framework powered by AI. Catches crashes, diagnoses errors, generates fixes, verifies, and restarts — automatically.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -186,6 +186,10 @@ async function _verifyPayment(paymentSig, price) {
186
186
  // Recover signer from EIP-712 typed data signature
187
187
  try {
188
188
  const { ethers } = require("ethers");
189
+ // Normalize all addresses to proper EIP-55 checksum format
190
+ const fromAddr = ethers.getAddress(auth.from);
191
+ const toAddr = ethers.getAddress(auth.to);
192
+
189
193
  const domain = {
190
194
  name: "USD Coin",
191
195
  version: "2",
@@ -203,8 +207,8 @@ async function _verifyPayment(paymentSig, price) {
203
207
  ],
204
208
  };
205
209
  const message = {
206
- from: auth.from,
207
- to: auth.to,
210
+ from: fromAddr,
211
+ to: toAddr,
208
212
  value: auth.value,
209
213
  validAfter: auth.validAfter,
210
214
  validBefore: auth.validBefore,
@@ -212,7 +216,7 @@ async function _verifyPayment(paymentSig, price) {
212
216
  };
213
217
 
214
218
  const recoveredAddress = ethers.verifyTypedData(domain, types, message, sig);
215
- if (recoveredAddress.toLowerCase() !== auth.from.toLowerCase()) {
219
+ if (recoveredAddress.toLowerCase() !== fromAddr.toLowerCase()) {
216
220
  return { valid: false, reason: "Signature mismatch" };
217
221
  }
218
222