-
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(Bonus Pagamenti Digitali): [#175783832] Alerts when BPD is already active #2420
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2420 +/- ##
=======================================
Coverage 50.08% 50.08%
=======================================
Files 672 672
Lines 19181 19186 +5
Branches 3754 3756 +2
=======================================
+ Hits 9607 9610 +3
- Misses 9528 9530 +2
Partials 46 46
Continue to review full report at Codecov.
|
ts/features/bonus/bpd/screens/onboarding/BpdInformationScreen.tsx
Outdated
Show resolved
Hide resolved
); | ||
const BpdInformationScreen: React.FunctionComponent<Props> = (props: Props) => { | ||
const onConfirm = () => | ||
getValue(props.bpdActiveBonus) === 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.
The bpd activation is prefetched in the wallet, but we should also handle the case if it is still RemoteLoading
or RemoteError
, we no longer have the guarantee that the data will be loaded when we arrive on this page, having removed the check that guaranteed it in the saga.
One solution could be restore the saga part:
// read if the bpd is active for the user
const isBpdActive: SagaCallReturnType<typeof isBpdEnabled> = yield call(
isBpdEnabled
);
in order to have the error /retry logic, and after that check we can continue to the InformationScreen with the safeness to have the data loaded.
Otherwise we have to handel the loading and the error inside the BpdInformationScreen
.
We could see together tomorrow!
Co-authored-by: fabriziofff <[email protected]>
Co-authored-by: fabriziofff <[email protected]>
Short description
This PR adds an alert when trying to request BPD when it's already active