Skip to content

Commit

Permalink
Move consent_acquired event emission after network call (#8377)
Browse files Browse the repository at this point in the history
* Move `consent_acquired` event emission after network call

* Add note to changelog
  • Loading branch information
tillh-stripe authored May 9, 2024
1 parent 7d73b62 commit d119633
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# CHANGELOG

## XX.XX.XX - 2023-XX-XX
## XX.XX.XX - 20XX-XX-XX

### Financial Connections
* [Changed][8377](https://github.com/stripe/stripe-android/pull/8377) The `FinancialConnectionsEvent.Name.CONSENT_ACQUIRED` event is now emitted when the consent has been acquired _and_ successfully confirmed with the Stripe backend. Previously, the event was emitted before the confirmation, making it possible to receive multiple `CONSENT_ACQUIRED` events in a single session.

### PaymentSheet
* [ADDED][8430](https://github.com/stripe/stripe-android/pull/8430) Added support for using `Maestro` cards with `Google Pay`
Expand Down Expand Up @@ -28,7 +31,7 @@ Dependencies updated in [8381](https://github.com/stripe/stripe-android/pull/838
## 20.40.4 - 2024-04-04

### Financial Connections
[Fixed][8223](https://github.com/stripe/stripe-android/pull/8223) Fixed a crash that occurred when using Compose 1.6.
* [Fixed][8223](https://github.com/stripe/stripe-android/pull/8223) Fixed a crash that occurred when using Compose 1.6.

## 20.40.3 - 2024-04-01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ internal class ConsentViewModel @AssistedInject constructor(
fun onContinueClick() {
suspend {
eventTracker.track(ConsentAgree)
FinancialConnections.emitEvent(Name.CONSENT_ACQUIRED)
val updatedManifest: FinancialConnectionsSessionManifest = acceptConsent()
FinancialConnections.emitEvent(Name.CONSENT_ACQUIRED)
navigationManager.tryNavigateTo(updatedManifest.nextPane.destination(referrer = Pane.CONSENT))
updatedManifest
}.execute { copy(acceptConsent = it) }
Expand Down

0 comments on commit d119633

Please sign in to comment.