wolverine-ai 5.2.0 → 5.2.1

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.2.0",
3
+ "version": "5.2.1",
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": {
@@ -270,7 +270,9 @@ async function _selfSettle(paymentSig, price) {
270
270
 
271
271
  // Verify amount
272
272
  const expectedUsdc = Math.round(parseFloat(price.replace("$", "")) * 1e6);
273
- const actualUsdc = parseInt(auth.value, 16) || parseInt(auth.value, 10) || 0;
273
+ // Value comes as decimal string (e.g. "1000000" for $1) or hex (legacy "0xf4240")
274
+ const valStr = String(auth.value);
275
+ const actualUsdc = valStr.startsWith("0x") ? parseInt(valStr, 16) : parseInt(valStr, 10) || 0;
274
276
  if (actualUsdc < expectedUsdc * 0.99) {
275
277
  return { valid: false, reason: "amount_mismatch" };
276
278
  }