From 14ba43fb1414a021716cd3244197a33996b76335 Mon Sep 17 00:00:00 2001 From: Sarah Koop Date: Tue, 10 Oct 2023 09:47:03 -0500 Subject: [PATCH] Update markdown diff --- v5_MIGRATION_GUIDE.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/v5_MIGRATION_GUIDE.md b/v5_MIGRATION_GUIDE.md index 49fef38d00..74e7523165 100644 --- a/v5_MIGRATION_GUIDE.md +++ b/v5_MIGRATION_GUIDE.md @@ -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() { @@ -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 +- } } ```