Skip to content

[$1000] Create new library and native module react-native-wallet #36957

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

Open
thienlnam opened this issue Feb 20, 2024 · 146 comments
Open

[$1000] Create new library and native module react-native-wallet #36957

thienlnam opened this issue Feb 20, 2024 · 146 comments
Labels
External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Weekly KSv2

Comments

@thienlnam
Copy link
Contributor

thienlnam commented Feb 20, 2024

To support tokenization in NewDot which is adding a virtual card to Apple / Google Pay, we will need access to some native methods.

Problem:
Apple Pay and Google Pay are table stakes in the card market today. We support both of them for physical and virtual cards. Going forward, members will be able to access their virtual card details in NewDot. However, it isn't intuitive to know that you can copy your virtual card details, and manually key them into the Apple/Google wallet apps to tokenize your virtual card.

We're going to create a new package that will return the necessary parameters and call native methods for adding a card to the wallet

The endpoint we want to call is CreateDigitalWallet.
We will need to call native modules to fetch specific native variables to call CreateDigitalWallet

  • deviceID
  • certificates
  • nonce
  • nonceSignature

Then once we have the return values, we will call the native modules to add these to apple / google wallets

CreateDigitalWallet Summary

The parameters required for the new CreateDigitalWallet API/auth command are:

Mutual parameters Android specific parameters iOS specific parameters
1.appVersion 1.walletAccountID 2.deviceID 1.certificates 2.nonce 3.nonceSignature

The return values for the new CreateDigitalWallet API/auth command are:

Mutual return values Android return values iOS return values
1.cardToken 1.opaquePaymentCard 2.userAddress 3.network 4.tokenServiceProvider 5.displayName 6.lastDigits 1.encryptedPassData 2.activationData 3.ephemeralPublicKey
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e91e840e65f1cbba
  • Upwork Job ID: 1765158784361259008
  • Last Price Increase: 2024-03-12
  • Automatic offers:
    • brunovjk | Reviewer | 107119121
Issue OwnerCurrent Issue Owner: @lschurr
@thienlnam thienlnam self-assigned this Feb 20, 2024
@melvin-bot melvin-bot bot added the Monthly KSv2 label Feb 26, 2024
@thienlnam thienlnam changed the title Create new library react-native-wallet Create new library and native module react-native-wallet Mar 5, 2024
@thienlnam thienlnam added the External Added to denote the issue can be worked on by a contributor label Mar 5, 2024
@melvin-bot melvin-bot bot changed the title Create new library and native module react-native-wallet [$500] Create new library and native module react-native-wallet Mar 5, 2024
Copy link

melvin-bot bot commented Mar 5, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01e91e840e65f1cbba

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 5, 2024
Copy link

melvin-bot bot commented Mar 5, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

@melvin-bot melvin-bot bot added the Daily KSv2 label Mar 5, 2024
@thienlnam thienlnam added NewFeature Something to build that is a new item. and removed Daily KSv2 labels Mar 5, 2024
@melvin-bot melvin-bot bot removed the Monthly KSv2 label Mar 5, 2024
Copy link

melvin-bot bot commented Mar 5, 2024

@melvin-bot melvin-bot bot added the Weekly KSv2 label Mar 5, 2024
Copy link

melvin-bot bot commented Mar 5, 2024

⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

@thienlnam thienlnam added the Daily KSv2 label Mar 5, 2024
@suneox
Copy link
Contributor

suneox commented Mar 7, 2024

Hi @thienlnam how can I access issue?

@thienlnam
Copy link
Contributor Author

Hey @suneox, I copied what was relevant from the issue into this description

@melvin-bot melvin-bot bot added the Overdue label Mar 11, 2024
@lschurr
Copy link
Contributor

lschurr commented Mar 11, 2024

Hey @thienlnam - are we just waiting for proposals on this one?

@melvin-bot melvin-bot bot removed the Overdue label Mar 11, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@thienlnam thienlnam changed the title [$500] Create new library and native module react-native-wallet [$1000] Create new library and native module react-native-wallet Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

Upwork job price has been updated to $1000

@thienlnam
Copy link
Contributor Author

Updated the bounty since this is a more intensive - let's give it another week and then we can hand it to our expert contributors? cc @lschurr

@brunovjk
Copy link
Contributor

brunovjk commented Mar 12, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

The problem identified is that users may find it unintuitive to manually input their virtual card details into the Apple Pay or Google Pay wallet apps.

What is the root cause of that problem?

New Feature

What changes do you think we should make in order to solve the problem?

The proposed solution is to create a new package that will handle the process of adding a Expensify NewDot Virtual Card to the Google Pay/Apple Pay Wallet by creating a new package that will return the necessary parameters and call native methods for adding the card to the wallet

First we need to call native modules to fetch specific native variables:

  1. Mutual Parameters:

    • appVersion: We'll utilize the react-native-device-info library to fetch the current version of the application.
  2. For Android:

    • walletAccountID: We'll use native methods provided by the Google Pay API to retrieve the user's Google account ID associated with their Google Pay wallet. This ID is typically obtained through the Google Pay PaymentDataRequest object, specifically from the getGoogleTransactionId() method.
    • deviceID: To fetch the unique device identifier (ID) for Android devices, we'll utilize the react-native-device-info library.
  3. For iOS:

    • certificates: We will utilize the server certificates provided by Apple's PKAddPaymentPassRequest class for adding payment passes to Apple Pay.
    • nonce: We will generate a nonce using cryptographic operations, such as elliptic curve cryptography (ECC), as required by Apple's PKAddPaymentPassRequest class.
    • nonceSignature: nonceSignature: We will generate a nonce signature using cryptographic operations, such as ECC, as specified by Apple's PKAddPaymentPassRequest class.

Fetch return values:

  1. For Android:

    • Android Push Provisioning API: We need to utilize this API to interact with Google Pay services and retrieve the necessary return values. This includes obtaining the opaquePaymentCard, userAddress, network, tokenServiceProvider, displayName, and lastDigits. We can integrate the Android Push Provisioning API using the official documentation provided by Google.
  2. For iOS:

    • Apple Wallet PassKit Framework: To interact with Apple Wallet and retrieve return values such as encryptedPassData, activationData, and ephemeralPublicKey, we'll need to use Apple's PassKit framework. This framework provides APIs for adding passes to Apple Wallet and managing pass data.

What alternative solutions did you explore? (Optional)

N/A

Note: While I've outlined the proposed solution based on the current understanding of the problem and available resources, I'm open to exploring alternative approaches suggested by the team.

@melvin-bot melvin-bot bot added the Overdue label Mar 14, 2024
@lschurr
Copy link
Contributor

lschurr commented Mar 14, 2024

Could you review the proposal @akinwale?

@github-project-automation github-project-automation bot moved this from Second Cohort - HIGH to Done in [#whatsnext] #migrate May 5, 2025
@parasharrajat
Copy link
Member

This is not yet completed. cc: @roryabraham

@Julesssss Julesssss reopened this May 5, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels May 6, 2025
@melvin-bot melvin-bot bot changed the title [$1000] Create new library and native module react-native-wallet [Due for payment 2025-05-14] [$1000] Create new library and native module react-native-wallet May 7, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 7, 2025
Copy link

melvin-bot bot commented May 7, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented May 7, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.40-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-05-14. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented May 7, 2025

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels May 7, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels May 15, 2025
@melvin-bot melvin-bot bot changed the title [Due for payment 2025-05-14] [$1000] Create new library and native module react-native-wallet [Due for payment 2025-05-27] [Due for payment 2025-05-14] [$1000] Create new library and native module react-native-wallet May 20, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 20, 2025
Copy link

melvin-bot bot commented May 20, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented May 20, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.46-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-05-27. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented May 20, 2025

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

@parasharrajat
Copy link
Member

PR #60494 was deployed to PROD 2 weeks back, but somehow the automation failed to update the issue status. As I reviewed only that PR. It should be ready for payment for me as per #36957 (comment). @lschurr Can you please add payment summary for me?

@mountiny
Copy link
Contributor

@parasharrajat we are going to wait with this one once the project is completed I think to not crumble this to many payments, it should not take long

@mountiny mountiny removed the Awaiting Payment Auto-added when associated PR is deployed to production label May 20, 2025
@mountiny mountiny changed the title [Due for payment 2025-05-27] [Due for payment 2025-05-14] [$1000] Create new library and native module react-native-wallet [$1000] Create new library and native module react-native-wallet May 20, 2025
@Skalakid
Copy link
Contributor

Skalakid commented May 26, 2025

Hello, the react-native-wallet library is nearly finished. We are now waiting for the results of testing in-app provisioning on E/App production. We need to test the following things:

  • Adding Expensify Card to the Apple and Google Wallet from E/App
  • Getting cards in-wallet state inside the E/App - verifying if the Add to ... Wallet button disappears after the card is successfully added
  • Adding Expensify Card to the Wallet directly from the Apple/Google Wallet App, and verifying if the card state is updated in E/App

If all the above test cases succeed, we will publish the library to npm :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Weekly KSv2
Projects
Status: Polish
Development

No branches or pull requests