-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat: [#176299898] Amex warning (transaction >1000 EUR) #2671
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2671 +/- ##
========================================
Coverage 51.54% 51.54%
========================================
Files 730 730
Lines 20731 20738 +7
Branches 3967 3646 -321
========================================
+ Hits 10686 10690 +4
- Misses 10001 10004 +3
Partials 44 44
Continue to review full report at Codecov.
|
infoBoxContainer: { padding: 20, backgroundColor: IOColors.orange }, | ||
infoBoxMessage: { | ||
color: IOColors.white, | ||
backgroundColor: IOColors.orange |
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.
backgroundColor: IOColors.orange |
Maybe we could avoid this background since it is already set in infoBoxContainer
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.
Thank you for pointing out, I'll fix it
verifica.importoSingoloVersamento >= 100000 && ( | ||
<View style={styles.infoBoxContainer}> | ||
<InfoBox alignedCentral={true} iconColor={IOColors.white}> | ||
<Text style={styles.infoBoxMessage}> |
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.
It's pretty the same but we should prefer IO typography components
<Text style={styles.infoBoxMessage}> | |
<Label weight={"Regular"} color={"white"}> | |
{I18n.t("wallet.alert.amex")} | |
</Label> |
@@ -116,6 +124,16 @@ class PickPaymentMethodScreen extends React.Component<Props> { | |||
|
|||
<View spacer={true} /> | |||
|
|||
{wallets.some(myWallet => myWallet.creditCard?.brand === "AMEX") && | |||
verifica.importoSingoloVersamento >= 100000 && ( |
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.
Could 10000 be a const declared outside the component?
In that way it should be easier to read/edit
https://en.wikipedia.org/wiki/Magic_number_(programming)
Short description
This PR adds an InfoBox in PickPaymentMethod Screen to warn AMEX users of limits affecting their transactions
List of changes proposed in this pull request
InfoBox
inPickPaymentMethodScreen
How to test
Visual Test: please see the attached images
Before delivery, a test in production with a real card and real payment is needed
- Test 2: No AMEX, Amount < 1000 EUR
- Test 3: Si AMEX, Amount < 1000 EUR
- Test 4: Si AMEX, Amount > 1000 EUR