Skip to content

Commit

Permalink
Update markdown diff
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahkoop committed Oct 10, 2023
1 parent 41c02b1 commit 14ba43f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions v5_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ class MyActivity : FragmentActivity() {
private lateinit var venmoClient: VenmoClient

@override fun onCreate(savedInstanceState: Bundle?) {
- initializeClients()
+ // can initialize clients outside of onCreate if desired
- initializeClients()
+ venmoLauncher = VenmoLauncher(this) { authChallengeResult ->
venmoClient.tokenizeVenmoAccount(authChallengeResult) { venmoAccountNonce, error ->
error?.let { /* handle error */ }
venmoAccountNonce?.let { /* handle Venmo account nonce */ }
}
}
+ venmoClient.tokenizeVenmoAccount(authChallengeResult) { venmoAccountNonce, error ->
+ error?.let { /* handle error */ }
+ venmoAccountNonce?.let { /* handle Venmo account nonce */ }
+ }
+ }
}

fun initializeClients() {
Expand All @@ -60,18 +60,18 @@ class MyActivity : FragmentActivity() {
fun onVenmoButtonClick() {
- venmoClient.tokenizeVenmoAccount(activity, request)
+ venmoClient.requestAuthChallenge(this, venmoRequest) { authChallenge, error ->
error?.let { /* handle error */ }
authChallenge?.let { venmoLauncher.launch(it) }
}
+ error?.let { /* handle error */ }
+ authChallenge?.let { venmoLauncher.launch(it) }
+ }
}

- override fun onVenmoSuccess(venmoAccountNonce: VenmoAccountNonce) {
// handle Venmo account nonce
}
- // handle Venmo account nonce
- }

- override fun onVenmoFailure(error: java.lang.Exception) {
// handle error
}
- // handle error
- }
}
```

0 comments on commit 14ba43f

Please sign in to comment.