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

Get completion loop frame count from initialize client #5679

Conversation

awush-stripe
Copy link
Collaborator

Summary

Get the completion loop frame count for CIV from the call to initialize_client

Motivation

We've been seeing elevated 4xx errors due to verification payloads being too large. This reduces the number of images sent.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Comment on lines +38 to +40
val compressionRatio: Double,
val imageSize: Size,
val imageCount: Int
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

prefer immutability

Copy link

@jaimepark-stripe jaimepark-stripe left a comment

Choose a reason for hiding this comment

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

Since these configs won't be available immediately, where do you set default values?

imageSize = Size(width, height)
}
}
val DEFAULT = ImageSettings(0.92, Size(1080, 1920), 3)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jaimepark-stripe these are the default values

Choose a reason for hiding this comment

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

oh woops! didnt see this. ty!

Copy link

@jaimepark-stripe jaimepark-stripe left a comment

Choose a reason for hiding this comment

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

💯 / 10 🔥 🔥 ❇️ 🚢

Copy link

@jaimepark-stripe jaimepark-stripe left a comment

Choose a reason for hiding this comment

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

nice change! love that this change accounts for unknown fields 🚢

@jaimepark-stripe
Copy link

@awush-stripe do we want to merge this if we decide the lower compression ratio is good enough?

@awush-stripe
Copy link
Collaborator Author

discussed offline, we'll still merge this.

@awush-stripe awush-stripe merged commit 6c0045e into master Oct 6, 2022
@awush-stripe awush-stripe deleted the awush/get_completion_loop_frame_count_from_initialize_client branch October 6, 2022 20:29
@@ -4,8 +4,7 @@ import android.util.Size
import androidx.test.filters.SmallTest
import com.stripe.android.stripecardscan.framework.util.AcceptedImageConfigs
import com.stripe.android.stripecardscan.framework.util.ImageFormat

Choose a reason for hiding this comment

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

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.

None yet

4 participants