moltspay 0.8.8 → 0.8.9
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/dist/cli/index.js +6 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +6 -4
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/server/index.js +6 -4
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +6 -4
- package/dist/server/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -30632,11 +30632,13 @@ var MoltsPayServer = class {
|
|
|
30632
30632
|
if (payment.x402Version !== X402_VERSION) {
|
|
30633
30633
|
return { valid: false, error: `Unsupported x402 version: ${payment.x402Version}` };
|
|
30634
30634
|
}
|
|
30635
|
-
|
|
30636
|
-
|
|
30635
|
+
const scheme = payment.accepted?.scheme || payment.scheme;
|
|
30636
|
+
const network = payment.accepted?.network || payment.network;
|
|
30637
|
+
if (scheme !== "exact") {
|
|
30638
|
+
return { valid: false, error: `Unsupported scheme: ${scheme}` };
|
|
30637
30639
|
}
|
|
30638
|
-
if (
|
|
30639
|
-
return { valid: false, error: `Network mismatch: expected ${this.networkId}, got ${
|
|
30640
|
+
if (network !== this.networkId) {
|
|
30641
|
+
return { valid: false, error: `Network mismatch: expected ${this.networkId}, got ${network}` };
|
|
30640
30642
|
}
|
|
30641
30643
|
return { valid: true };
|
|
30642
30644
|
}
|