-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spec] Leading +
character when parsing amount
#101
Comments
+
character when parsing amount
+
character when parsing amount
Yes, forbidding a leading plus would be good. This was intentional in the reference implementation, but we could stand to make the spec more strict. Also, awesome project! I can't view your Gitlab, so I'm guessing it's still private? |
Since you're doing an awesome job of reviewing the spec and finding places where it's ambiguous or inconsistent, would you and @chitalian take a look at #77 and the latest spec there? Transfer requests should be mostly the same, but transaction requests are new. Wallets are actively implementing this now, but it's still open for feedback! |
Sounds good 😄
Yep, we're in the never-ending "almost ready to publish" phase 😅 We'll be submitting it as an entry in the Riptide hackathon though, so it'll be up soon! You're welcome to add it to the Edit: it's published now!
I took a quick scan over it, I will add my thoughts there. |
@chitalian and I are working on a Rust port of the
@solana/pay
JavaScript SDK. Many float implementations, including the one in the Rust standard library and theBigNumber
library used by the official SDK, consider a leading+
to be valid when parsing numbers. We noticed that the description in the spec does not address the behavior of a leading+
character. For reference, it looks like the official SDK happens to forbid a leading+
, although it's unclear from the code whether or not it's intentional. Forbidding a leading+
feels like the correct choice, but it would be great to have that clarified in the spec.The text was updated successfully, but these errors were encountered: