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/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
- if (payment.scheme !== "exact") {
30636
- return { valid: false, error: `Unsupported scheme: ${payment.scheme}` };
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 (payment.network !== this.networkId) {
30639
- return { valid: false, error: `Network mismatch: expected ${this.networkId}, got ${payment.network}` };
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
  }