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

feat(Bonus Pagamenti Digitali): [#175783832] Alerts when BPD is already active #2420

Merged
merged 11 commits into from
Nov 27, 2020

Conversation

CrisTofani
Copy link
Contributor

Short description

This PR adds an alert when trying to request BPD when it's already active

@pagopa-github-bot pagopa-github-bot changed the title [#175783832] Alerts when BPD is already active feat(Bonus Pagamenti Digitali): [#175783832] Alerts when BPD is already active Nov 24, 2020
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Nov 24, 2020

Affected stories

  • 🌟 #175783832: Come CIT voglio essere avvisato quando bpd è già attivo ma provo ad attivarlo di nuovo

Generated by 🚫 dangerJS against 300d18c

@codecov-io
Copy link

codecov-io commented Nov 24, 2020

Codecov Report

Merging #2420 (300d18c) into master (0083bfa) will increase coverage by 0.00%.
The diff coverage is 31.25%.

Impacted file tree graph

@@           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           
Impacted Files Coverage Δ
...d/saga/orchestration/onboarding/startOnboarding.ts 51.42% <0.00%> (+1.42%) ⬆️
...us/bpd/screens/onboarding/BpdInformationScreen.tsx 63.63% <45.45%> (-7.80%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0083bfa...300d18c. Read the comment docs.

locales/it/index.yml Outdated Show resolved Hide resolved
);
const BpdInformationScreen: React.FunctionComponent<Props> = (props: Props) => {
const onConfirm = () =>
getValue(props.bpdActiveBonus) === true
Copy link
Contributor

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!

@fabriziofff fabriziofff merged commit bda6a45 into master Nov 27, 2020
@fabriziofff fabriziofff deleted the 175783832-alert-bpd-already-active branch November 27, 2020 15:57
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.

4 participants