Skip to content

fix: validate pairing uri#1109

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

fix: validate pairing uri#1109
jaymengxy merged 1 commit intodevelopfrom
fix_wc

Conversation

@jaymengxy
Copy link
Copy Markdown
Contributor

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 27, 2025
@jaymengxy jaymengxy requested a review from a team as a code owner May 27, 2025 07:46
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2025

PR Summary

Added URI validation for WalletConnect pairing process, improved type safety in wallet sync, and enhanced the EVM transaction dialog UI. Removed session cleanup code that was causing delays during pairing. The changes focus on better error handling and user experience improvements.

Changes

File Summary
app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnect.kt Added CoreClient.Pairing.validatePairingUri() check before pairing. Fixed nullable boolean comparison with == true. Commented out session cleanup code and delay that were potentially causing issues.
app/src/main/java/com/flowfoundation/wallet/page/wallet/sync/WalletSyncViewModel.kt Added explicit String type parameter to suspendCoroutine for better type safety in wcFetchPairUriInternal function.
app/src/main/java/com/flowfoundation/wallet/widgets/webview/evm/dialog/EVMSendTransactionDialog.kt Implemented close button click handler in EVMSendTransactionDialog that invokes callback with false and dismisses the dialog.
app/src/main/res/layout/dialog_evm_transaction.xml Added close button icon, adjusted action button margins and constraints. Improved overall dialog layout with better spacing and bottom constraints.

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)
  • 75cb071: fix: validate pairing uri
Files Processed (4)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnect.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/wallet/sync/WalletSyncViewModel.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/widgets/webview/evm/dialog/EVMSendTransactionDialog.kt (1 hunk)
  • app/src/main/res/layout/dialog_evm_transaction.xml (2 hunks)
Actionable Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnect.kt [67-67]

    possible bug: "Potential null pointer exception in boolean expression"

Skipped Comments (2)
  • app/src/main/java/com/flowfoundation/wallet/page/wallet/sync/WalletSyncViewModel.kt [38-38]

    best practice: "Missing type parameter in suspendCoroutine call"

  • app/src/main/res/layout/dialog_evm_transaction.xml [79-85]

    enhancement: "Missing content description for accessibility"


isInitialized()
} ?: false
} == true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The expression == true is used directly with a nullable result from the previous block. While it works, it's better to use the safe equals operator ?: to handle the null case explicitly:

} ?: false

@jaymengxy jaymengxy merged commit b99792e into develop May 27, 2025
3 checks passed
@jaymengxy jaymengxy deleted the fix_wc branch May 27, 2025 08:26
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