Project: Personal card import in NewDot
Project tracking issue: Expensify/Expensify#555211
Problem
Currently, when a personal card has a broken connection, we are linking to OldDot for the user to fix the card:
|
<Button |
|
text={translate('personalCard.fixCard')} |
|
onPress={() => openOldDotLink(CONST.OLDDOT_URLS.SETTINGS_WALLET_URL)} |
|
isDisabled={isOffline || card?.isLoadingLastUpdated} |
|
style={styles.mb0} |
|
/> |
Solution
Stop linking to OldDot, and add support in NewDot for refreshing a broken connection. The flows will mirror their company card reconnection counterparts.
For direct OAuth bank connections:
- Open BankConnection flow again so that user hits oauth callback (with the same query parameters as the new connection flow)
- Backend triggers new async scrape for the card(s), redirects to bank-connection-complete and closes the popup. Async scrape pushes Onyx updates to CARD_LIST when complete
For Plaid:
- Add optional
cardID parameter to OpenPlaidCardsBankLogin API calls, and include the param when reconnecting to Plaid for personal card. Call openPlaidCompanyCardLogin(country, domain = '', feed, isPersonal = true, cardID) which will refresh the Plaid Link token
- On success call AddPersonalPlaidCard API again. Async scrape pushes Onyx updates to CARD_LIST when complete
Issue Owner
Current Issue Owner: @ShridharGoel
Project: Personal card import in NewDot
Project tracking issue: Expensify/Expensify#555211
Problem
Currently, when a personal card has a broken connection, we are linking to OldDot for the user to fix the card:
App/src/pages/settings/Wallet/PersonalCardDetailsPage.tsx
Lines 151 to 156 in bf15607
Solution
Stop linking to OldDot, and add support in NewDot for refreshing a broken connection. The flows will mirror their company card reconnection counterparts.
For direct OAuth bank connections:
For Plaid:
cardIDparameter toOpenPlaidCardsBankLoginAPI calls, and include the param when reconnecting to Plaid for personal card. CallopenPlaidCompanyCardLogin(country, domain = '', feed, isPersonal = true, cardID)which will refresh the Plaid Link tokenIssue Owner
Current Issue Owner: @ShridharGoel