anza-xyz / solana-pay

A new standard for decentralized payments.
https://solanapay.com
Apache License 2.0
1.32k stars 464 forks source link

Error parsing recipient from url #215

Closed mordonez-me closed 10 months ago

mordonez-me commented 1 year ago

Encoding has the following format:

solana:CaGyA2tPA3fgTf7vsqMb3PK7PZLSbeWb9HvfcgwzENaa/?amount=111000000&spl-token=2VhjJ9WxaGC3EZFwJG9BDUs9KxKCAjQY4vgd1qxgYWVg&label=nedpos&memo=a999e32a-9976-44ff-a85a-021369dbd8e8

Then decoding uses pathname which returns CaGyA2tPA3fgTf7vsqMb3PK7PZLSbeWb9HvfcgwzENaa/ and then try to use that in a PublicKey, which throws an error.

image

jordaaash commented 10 months ago

You have a / character after the recipient. This isn't valid.