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

Start buy flow if loading for rewarded ads fails #3254

Merged
merged 6 commits into from
Oct 16, 2023
Merged

Start buy flow if loading for rewarded ads fails #3254

merged 6 commits into from
Oct 16, 2023

Conversation

mhkawano
Copy link
Contributor

@mhkawano mhkawano commented Oct 13, 2023

In cases where we cannot init gpt.js we will mark rewarded ads as dismissed and show a buy flow.

b/305721069

Copy link
Contributor

@fikus fikus left a comment

Choose a reason for hiding this comment

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

Can you also add a bug ID for future reference?

Comment on lines 347 to 349
if (this.params_.onCancel) {
this.params_.onCancel();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: replace with this.params_.onCancel?.();

Comment on lines 351 to 353
if (this.params_.monetizationFunction) {
this.params_.monetizationFunction();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar here, use optional chaining to invoke the function.

@@ -292,7 +292,7 @@ const REWARDED_AD_CSS = css`
color: #202124;
grid-column: 2;
grid-row: 1;
line-break: anywhere;
line-break: auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this unrelated changed meant to be included?

@mhkawano
Copy link
Contributor Author

Applied the changed and updated the description with a bug.

@mhkawano mhkawano merged commit c500428 into subscriptions-project:main Oct 16, 2023
5 checks passed
@mhkawano mhkawano deleted the rewarded_ad_handle_failure branch October 16, 2023 16:33
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