Skip to content

Commit

Permalink
Tweak formatting again.
Browse files Browse the repository at this point in the history
  • Loading branch information
sshropshire committed Oct 30, 2024
1 parent 585e9b0 commit c461cfd
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions v2_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,14 @@ We have refactored the `CardClient` API to improve the developer experience.

The `CardClient` constructor no longer requires an activity reference. We require an activity reference only when we're launching a Chrome Custom Tab, e.g. `CardClient.presentAuthChallenge()`.

##### The New Way (v2)
This should make constructing `CardClient` instances less restrictive e.g. it should easier to construct a `CardClient` within a Jetpack `ViewModel`:

```kotlin
val config = CoreConfig("<CLIENT_ID>", Environment.LIVE)
val cardClient = CardClient(requireContext(), config)
-val cardClient = CardClient(requireActivity(), config)
+val cardClient = CardClient(requireContext(), config)
```

##### The Old Way (v1)

```kotlin
val config = CoreConfig("<CLIENT_ID>", Environment.LIVE)
val cardClient = CardClient(requireActivity(), config)
```

This should make constructing `CardClient` instances less restrictive e.g. it should easier to construct a `CardClient` within a Jetpack `ViewModel`.

### PayPalWebPayments

We have refactored the `PayPalWebClient` API to improve the developer experience.
Expand Down

0 comments on commit c461cfd

Please sign in to comment.