Skip to content
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

Make UAs throw for invalid monetary amounts #256

Merged
merged 5 commits into from
Sep 16, 2016

Conversation

sideshowbarker
Copy link
Contributor

No description provided.

@adrianba
Copy link
Contributor

The problem with this change is that it doesn't deal with the updating case where throwing isn't a possibility. Just like in #249 it would have been easy to throw in the constructor in this situation but then the behaviour would be inconsistent in updateWith(). We didn't really want the bad update to cause the payment request to be terminated because doing so looks like a user agent bug and not a page bug. Also it will be easier to debug the problem when a user explains what happens.

So for the currency value I'd prefer a different proposal.

@adrianba
Copy link
Contributor

adrianba commented Sep 16, 2016

Given that we already have the difference I outlined above for negative totals, I've updated the PR to apply the same difference to updateWith.

@adrianba adrianba merged commit 22a4c54 into gh-pages Sep 16, 2016
@adrianba adrianba deleted the sideshowbarker/valid-value branch September 16, 2016 21:23
@sideshowbarker
Copy link
Contributor Author

Thanks this looks great—will update the expected results in the corresponding wpt tests to match this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants