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

Bug/sdk 3671 #577

Merged
merged 7 commits into from
Mar 19, 2024
Merged

Bug/sdk 3671 #577

merged 7 commits into from
Mar 19, 2024

Conversation

CTLalit
Copy link
Collaborator

@CTLalit CTLalit commented Mar 2, 2024

https://wizrocket.atlassian.net/browse/SDK-3671

fixed init of variables in class first before using them in deviceInfo
did not use device id from state variable (shared pref map)
instead passed device id back from func as it is created on fly
this reduces risk of state variable changing over time as it is accessed in future
simplified ternary as it would always return null in both cases
the device id passed as method return type to be used
did not fetch device id from state (shared pref map)

CTLalit added 4 commits March 1, 2024 17:41
- fixed init of variables in class first before using them in deviceInfo
- did not use device id from state variable (shared pref map)
- instead passed device id back from func as it is created on fly
- this reduces risk of state variable changing over time as it is accessed in future
- simplified ternary as it would always return null in both cases
- the device id passed as method return type to be used
- did not fetch device id from state (shared pref map)
@@ -2767,13 +2767,13 @@ void deviceIDCreated(String deviceId) {
StoreProvider storeProvider = StoreProvider.getInstance();

if (storeRegistry.getInAppStore() == null) {
InAppStore inAppStore = storeProvider.provideInAppStore(context, cryptHandler, deviceInfo,
InAppStore inAppStore = storeProvider.provideInAppStore(context, cryptHandler, deviceId,
Copy link
Contributor

Choose a reason for hiding this comment

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

@CTLalit passing deviceId instead of deviceInfo will not solve null pointer exception. I believe deviceId will also be null here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

generated the device id and passed it as function return type, can you elaborate some null cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as discussed on call this can be resolved

- comment fixed
- seems some unreachable code can be due to legacy
Copy link
Contributor

@piyush-kukadiya piyush-kukadiya left a comment

Choose a reason for hiding this comment

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

LGTM

@piyush-kukadiya piyush-kukadiya merged commit 314b984 into develop Mar 19, 2024
4 checks passed
@piyush-kukadiya piyush-kukadiya deleted the bug/SDK-3671 branch September 9, 2024 11:30
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