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

Fix incorrect unix time conversion at android layer #731

Merged

Conversation

EricLin-BBpos
Copy link
Collaborator

Summary

Fix incorrect unix time conversion at Android layer.

Motivation

User reported that The availableUpdate object on the connectedReader object returned by the hook useStripeTerminal is inconsistent between android and iOS (The android's requiredAt is 1000 times bigger than it should be). This PR aims to correct this discrepancy to ensure cross-platform functionality is consistent and accurate.
#718

Testing

  • 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.

@@ -446,7 +446,7 @@ internal fun mapFromReaderSoftwareUpdate(update: ReaderSoftwareUpdate?): Writabl
"estimatedUpdateTime",
mapFromUpdateTimeEstimate(it.timeEstimate)
)
putString("requiredAt", convertToUnixTimestamp(it.requiredAt.time))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After function conversion, the "created" field on PaymentIntents is converted to same time units milliseconds on both Android and iOS except requiredAt. So we only need to fixing here.

@nazli-stripe nazli-stripe merged commit 8273dd9 into main Jun 18, 2024
2 checks passed
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.

2 participants