Skip to content

fix: walletconnect clean up session#1114

Merged
jaymengxy merged 1 commit intodevelopfrom
fix_wc
May 28, 2025
Merged

fix: walletconnect clean up session#1114
jaymengxy merged 1 commit intodevelopfrom
fix_wc

Conversation

@jaymengxy
Copy link
Copy Markdown
Contributor

@jaymengxy jaymengxy commented May 28, 2025

Related Issue

Closes #1102 #1054 #1092

Summary of Changes

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

@jaymengxy jaymengxy self-assigned this May 28, 2025
@jaymengxy jaymengxy requested a review from a team as a code owner May 28, 2025 02:51
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2025

PR Summary

Enabled previously commented-out WalletConnect session cleanup functionality and improved profile fragment stability by adding fragment lifecycle checks and safer activity access. The changes ensure proper session management in WalletConnect and prevent potential crashes in the profile UI.

Changes

File Summary
app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnect.kt Uncommented and enabled the cleanupActiveSessions() functionality that runs before pairing. This includes error handling and a 500ms delay to ensure proper cleanup completion.
app/src/main/java/com/flowfoundation/wallet/page/profile/presenter/ProfileFragmentPresenter.kt Added fragment attachment check (isAdded) to prevent UI updates on detached fragments. Replaced requireActivity() with safer activity access when checking night mode theme, reducing potential crash scenarios.

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.

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 30eab70: fix: walletconnect clean up session
Files Processed (2)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnect.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/page/profile/presenter/ProfileFragmentPresenter.kt (2 hunks)
Actionable Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/page/profile/presenter/ProfileFragmentPresenter.kt [165-167]

    possible bug: "Potential null pointer exception when accessing activity"

Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnect.kt [116-117]

    enhancement: "Consider making delay duration configurable"

@jaymengxy jaymengxy merged commit d8fc050 into develop May 28, 2025
6 checks passed
@jaymengxy jaymengxy deleted the fix_wc branch May 28, 2025 02:59
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.

Everytime I try to claim my kitty points it says unable to connect to wallet see video

2 participants