-
Notifications
You must be signed in to change notification settings - Fork 997
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
Update promo in MPE after bank flow #4370
base: master
Are you sure you want to change the base?
Conversation
🚨 New dead code detected in this PR: StripeAttestBackend.swift:24 warning: Parameter 'appId' is unused
StripeAttestBackend.swift:24 warning: Parameter 'deviceId' is unused
StripeAttestBackend.swift:24 warning: Parameter 'keyId' is unused
StripeAttestBackend.swift:20 warning: Parameter 'attestation' is unused
StripeAttestBackend.swift:14 warning: Property 'apiClient' is assigned, but never used
SavedPaymentMethodRowButton.swift:9 warning: Imported module 'StripeCore' is unused Please remove the dead code before merging. If this is intentional, you can bypass this check by adding the label ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with |
5ad3d19
to
b83e20a
Compare
2ed15ab
to
242910b
Compare
b83e20a
to
e564e9e
Compare
cabfd94
to
98c8d0d
Compare
1e979a0
to
d9df82d
Compare
...Sheet/Source/PaymentSheet/Vertical Main Screen/VerticalPaymentMethodListViewController.swift
Outdated
Show resolved
Hide resolved
2bba9f1
to
8d2951b
Compare
@@ -164,6 +169,11 @@ final class InstantDebitsPaymentMethodElement: ContainerElement { | |||
|
|||
return nameValid && emailValid && phoneValid && addressValid | |||
} | |||
|
|||
var displayableIncentive: PaymentMethodIncentive? { | |||
let canShowIncentive = linkedBank?.incentiveEligible ?? true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we default to true
here? I'd expect the opposite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don’t have a linked bank yet (and therefore no info if the session is eligible), we assume that the link_consumer_incentive
as coming from the backend is valid. Otherwise, we would never show the incentive before the user completes the flow 🙈
...StripePaymentSheet/Source/PaymentSheet/USBankAccount/InstantDebitsPaymentMethodElement.swift
Outdated
Show resolved
Hide resolved
...Sheet/Source/PaymentSheet/Vertical Main Screen/VerticalPaymentMethodListViewController.swift
Outdated
Show resolved
Hide resolved
19ff93c
to
8ae81af
Compare
7700e8a
to
4314eaf
Compare
- Rename `updateLinkedBank` to `renderLinkedBank` for greater clarity - Add explanatory comment to `canShowIncentive` - Make `refreshContent` a method instead of a property
8ae81af
to
10b949a
Compare
Summary
This pull request adds code to refresh the MPE’s promo information after the bank auth flow completes. If no incentive is available, the promo badge in the carousel and bank form should be updated accordingly.
Motivation
CONSUMERBANK-571
Testing
Changelog