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

Release 1.2.0 #76

Merged
merged 3 commits into from
Jul 1, 2020
Merged

Release 1.2.0 #76

merged 3 commits into from
Jul 1, 2020

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Jun 26, 2020

@vegaro vegaro requested a review from aboedo June 26, 2020 21:29
@vegaro
Copy link
Contributor Author

vegaro commented Jun 29, 2020

@aboedo bump

@aboedo
Copy link
Member

aboedo commented Jun 29, 2020

@vegaro sorry I'd missed this! reviewing

static PurchasesErrorCode getErrorCode(PlatformException e) {
return PurchasesErrorCode.values[int.parse(e.code)];
var errorCode = int.parse(e.code);
if (errorCode >= PurchasesErrorCode.values.length) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is good, although it serves as a good reminder that we'll have to be more careful regarding keeping the codes in sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I wonder if we could break the compilation somehow, or maybe add a test?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually thinking about that same thing for the swift enum in purchases-ios. a test might be the way to go, even if it only covers that the number of possible values is the same on both sides

lib/errors.dart Outdated
Comment on lines 40 to 42
/// if (errorCode == PurchasesErrorCode.purchaseCancelledError) {
/// print("User cancelled");
/// } else if (errorCode == PurchasesErrorCode.purchaseNotAllowedError) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: would a switch be more suitable?

@vegaro vegaro merged commit 493c71e into develop Jul 1, 2020
@vegaro vegaro deleted the release/1.2.0 branch July 1, 2020 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants