Skip to content

Commit d561946

Browse files
committed
fix(commerce): case-insensitive Solana CAIP-2 detection in verify_x402_request
Mirrors the node-commerce defensive fix: `.lower().startswith('solana:')` catches malformed credentials carrying uppercase or mixed-case CAIP-2 prefixes and routes them to the targeted Solana hint instead of the generic 'Unsupported x402 network' fallback.
1 parent aea2ac9 commit d561946

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

agentscore_commerce/payment/x402_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def verify_x402_request(input: VerifyX402RequestInput) -> VerifyX402Reques
157157
signed_pay_to = accepted.get("payTo")
158158

159159
if not signed_network or signed_network != input.accepted_network:
160-
if signed_network and signed_network.startswith("solana:"):
160+
if signed_network and signed_network.lower().startswith("solana:"):
161161
return VerifyX402RequestFailure(
162162
body=_regenerate_body(
163163
(

0 commit comments

Comments
 (0)