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

fix(health-sdk): Fix Share With flow broken when clients pop backst… #474

Conversation

danicretu
Copy link
Contributor

…ack after getting payment request callback

  • Added a broadcast receiver to intercept taps on the system share sheet
  • Move sending of OpenBankState.Success to after user picks an external app to share to
  • Drawback is that the OpenBankState.Success event is not emitted if the user dismisses the share sheet - but then I guess it's not of interest to the client to know that the paymentRequest was created, but not finalised

IPC-290

…ack after getting payment request callback

- Added a broadcast receiver to intercept taps on the system share sheet
- Move sending of `OpenBankState.Success` to after user picks an external app to share to
- Drawback is that the `OpenBankState.Success` event is not shared if the user dismisses the share sheet - but then I guess it's not of interest to the client to know that the `paymentRequest` was created, but not finalised

IPC-290
@danicretu danicretu requested a review from a-szotyori July 1, 2024 10:07
@danicretu danicretu self-assigned this Jul 1, 2024
…te to NoAction non-cancellable

This makes sure that the `openBankState` flow is reset to `PaymentState.NoAction` also when the
`ReviewViewModel`'s scope is cancelled due to the client dimissing the `ReviewFragment` when they
receive `PaymentState.Success`.

IPC-290
Copy link
Contributor

@a-szotyori a-szotyori left a comment

Choose a reason for hiding this comment

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

Nice work, I just left a suggestion and pushed a small fix because the openBankState flow was not reset to PaymentState.NoAction when the ReviewFragmant was dismissed (its ReviewViewModel's scope was cancelled which lead to also cancelling the coroutine that resets the openBankState).

Copy link

sonarcloud bot commented Jul 1, 2024

Copy link
Contributor

@a-szotyori a-szotyori left a comment

Choose a reason for hiding this comment

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

Thank you! Can go to QA 🎉

@danicretu danicretu merged commit e9b506a into main Jul 4, 2024
7 checks passed
@danicretu danicretu deleted the IPC-290--Share-with-flow-broken-when-client-devs-receive-the-payment-request-id-and-dismiss-the-Payment-Review-Screen branch July 4, 2024 05:50
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