Skip to content

fix: post staking info#1047

Merged
jaymengxy merged 1 commit intodevelopfrom
fix_staking_info
May 13, 2025
Merged

fix: post staking info#1047
jaymengxy merged 1 commit intodevelopfrom
fix_staking_info

Conversation

@jaymengxy
Copy link
Copy Markdown
Contributor

Related Issue

Closes #955

Summary of Changes

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

@jaymengxy jaymengxy added this to the Release 2.8.5 milestone May 13, 2025
@jaymengxy jaymengxy self-assigned this May 13, 2025
@jaymengxy jaymengxy requested a review from a team as a code owner May 13, 2025 08:01
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2025

PR Summary

Updated the WalletFragmentViewModel to use postValue instead of direct value assignment when updating staking information. This change ensures thread-safe updates of LiveData from background threads, preventing potential race conditions when updating the wallet's staking status and balance visibility state.

Changes

File Summary
app/src/main/java/com/flowfoundation/wallet/page/wallet/WalletFragmentViewModel.kt Changed dataListLiveData.value to dataListLiveData.postValue() when updating staking information to ensure thread-safe updates from background threads. This prevents potential race conditions when updating wallet data.

autogenerated by presubmit.ai

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

LGTM!

Review Summary

Commits Considered (1)
Files Processed (1)
  • app/src/main/java/com/flowfoundation/wallet/page/wallet/WalletFragmentViewModel.kt (1 hunk)
Actionable Comments (0)
Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/page/wallet/WalletFragmentViewModel.kt [83-83]

    possible issue: "Consider thread safety for data list modification"

@jaymengxy jaymengxy merged commit 967b470 into develop May 13, 2025
3 checks passed
@jaymengxy jaymengxy deleted the fix_staking_info branch May 13, 2025 09:53
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.

Yes, I know what steak it is, why isnt it showing up in mobile wallet??

3 participants