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

Link Wallet menu #9872

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Link Wallet menu #9872

wants to merge 2 commits into from

Conversation

toluo-stripe
Copy link
Contributor

@toluo-stripe toluo-stripe commented Jan 8, 2025

Summary

Integrate WalletPaymentMethodMenu with Link Wallet screen

Motivation

JIRA

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Screen.Recording.2025-01-08.at.1.43.06.PM.mov

Changelog

Copy link
Contributor

github-actions bot commented Jan 8, 2025

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │          compressed           │         uncompressed         
          ├───────────┬───────────┬───────┼───────────┬───────────┬──────
 APK      │ old       │ new       │ diff  │ old       │ new       │ diff 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼──────
      dex │     2 MiB │     2 MiB │   0 B │   4.1 MiB │   4.1 MiB │  0 B 
     arsc │     1 MiB │     1 MiB │   0 B │     1 MiB │     1 MiB │  0 B 
 manifest │   2.3 KiB │   2.3 KiB │   0 B │     8 KiB │     8 KiB │  0 B 
      res │ 301.8 KiB │ 301.8 KiB │   0 B │ 455.5 KiB │ 455.5 KiB │  0 B 
   native │   6.2 MiB │   6.2 MiB │   0 B │  15.8 MiB │  15.8 MiB │  0 B 
    asset │   7.2 KiB │   7.2 KiB │   0 B │   6.9 KiB │   6.9 KiB │  0 B 
    other │  90.2 KiB │  90.2 KiB │ +13 B │ 170.3 KiB │ 170.3 KiB │  0 B 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼──────
    total │   9.6 MiB │   9.6 MiB │ +13 B │  21.5 MiB │  21.5 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 19971 │ 19971 │ 0 (+0 -0) 
   types │  6191 │  6191 │ 0 (+0 -0) 
 classes │  4982 │  4982 │ 0 (+0 -0) 
 methods │ 29771 │ 29771 │ 0 (+0 -0) 
  fields │ 17541 │ 17541 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  164 │  164 │  0   
 entries │ 3622 │ 3622 │  0
APK
    compressed    │   uncompressed   │                                           
──────────┬───────┼───────────┬──────┤                                           
 size     │ diff  │ size      │ diff │ path                                      
──────────┼───────┼───────────┼──────┼───────────────────────────────────────────
 25.3 KiB │  +5 B │  62.8 KiB │  0 B │ ∆ META-INF/MANIFEST.MF                    
 28.4 KiB │  +4 B │  62.9 KiB │  0 B │ ∆ META-INF/CERT.SF                        
  1.2 KiB │  +3 B │   1.2 KiB │  0 B │ ∆ META-INF/CERT.RSA                       
    272 B │  +1 B │     120 B │  0 B │ ∆ META-INF/version-control-info.textproto 
──────────┼───────┼───────────┼──────┼───────────────────────────────────────────
 55.2 KiB │ +13 B │ 127.1 KiB │  0 B │ (total)

Comment on lines +176 to 177
composable(LinkScreen.CardEdit.ROUTE) {
CardEditScreen()
Copy link

Choose a reason for hiding this comment

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

The CardEdit route needs to extract the paymentDetailsId parameter from the NavBackStackEntry and pass it to CardEditScreen. The current implementation drops this required parameter. Consider updating to:

composable(
    route = LinkScreen.CardEdit.ROUTE,
    arguments = listOf(navArgument("paymentDetailsId") { type = NavType.StringType })
) { backStackEntry ->
    val paymentDetailsId = backStackEntry.arguments?.getString("paymentDetailsId")
    CardEditScreen(paymentDetailsId = paymentDetailsId)
}

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}

@Test
fun `viewmodel should open payment method screen when onEditPaymentMethodClicked`() = runTest(dispatcher) {
Copy link

Choose a reason for hiding this comment

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

The test name appears incorrect - it's testing onAddNewPaymentMethodClicked() but is named as if it tests onEditPaymentMethodClicked(). Consider renaming to match the actual behavior being tested.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@toluo-stripe toluo-stripe force-pushed the tolu/link/wallet_menu branch from 2c4a314 to 2316582 Compare January 8, 2025 18:39
@toluo-stripe toluo-stripe changed the title Wallet menu Link Wallet menu Jan 8, 2025
@@ -62,7 +64,12 @@ internal fun WalletScreen(
isExpanded = expanded
},
onPrimaryButtonClick = viewModel::onPrimaryButtonClicked,
onPayAnotherWayClick = viewModel::onPayAnotherWayClicked,
onPayAnotherWayClicked = viewModel::onPayAnotherWayClicked,
onRemoveClicked = {},
Copy link

Choose a reason for hiding this comment

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

The onRemoveClicked handler is currently empty, preventing payment methods from being removed. This should be wired up to viewModel.onRemovePaymentMethodClicked() to enable payment method removal functionality.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@toluo-stripe toluo-stripe marked this pull request as ready for review January 8, 2025 18:47
@toluo-stripe toluo-stripe requested review from a team as code owners January 8, 2025 18:47
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.

1 participant