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

Update collectData response to return as a CollectDataResultType #849

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

mindy-stripe
Copy link
Collaborator

@mindy-stripe mindy-stripe commented Nov 12, 2024

Summary

Fix Terminal.collectData to return the collected data in the correct CollectDataResultType format. The previous solution was directly returning the collected data object, when it should be returning it nested inside a collectedData key as defined in CollectDataResultType.

cc-ing @EricLin-BBpos who worked on the initial PR: #765

Motivation

Internal ticket filed by QA: https://jira.corp.stripe.com/browse/TERMINAL-41707

Testing

Tested manually with the dev-app. Ran npx react-native run-ios --device

  • I tested this manually
  • I added automated tests

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

nazli-stripe
nazli-stripe previously approved these changes Nov 13, 2024
src/functions.ts Outdated
@@ -905,7 +905,9 @@ export async function collectData(
return Logger.traceSdkMethod(async () => {
try {
const response = await StripeTerminalSdk.collectData(params);
return response;
return {
collectedData: response
Copy link
Collaborator

Choose a reason for hiding this comment

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

CI complain about the missing trailing commas style here.

/bitrise/src/src/functions.ts
909:32 error Insert , prettier/prettier

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks! updated

@nazli-stripe nazli-stripe merged commit f9af41a into main Nov 14, 2024
3 checks passed
@nazli-stripe nazli-stripe deleted the mindy/collect-data-response-format branch November 14, 2024 12:44
nazli-stripe pushed a commit that referenced this pull request Nov 14, 2024
* Update collectData response to return as a CollectDataResultType

* Lint
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.

3 participants