Skip to content

Fix walletconnect method error#1157

Merged
lmcmz merged 2 commits intodevelopfrom
hotfix/wc-payer
Jun 10, 2025
Merged

Fix walletconnect method error#1157
lmcmz merged 2 commits intodevelopfrom
hotfix/wc-payer

Conversation

@lmcmz
Copy link
Copy Markdown
Contributor

@lmcmz lmcmz commented Jun 9, 2025

Related Issue

Closes #150, #1146

Summary of Changes

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

@lmcmz lmcmz requested a review from a team as a code owner June 9, 2025 15:47
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 9, 2025

PR Summary

Fixed a bug in the WalletConnect session approval process by removing unnecessary namespace generation. The PR simplifies the session approval flow by directly using the provided namespaces instead of regenerating them, which was causing method errors. This change addresses issues #150 and #1146.

Changes

File Summary
app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/Utils.kt Removed unnecessary generateApprovedNamespaces call in approveSession extension function. Now directly using provided namespaces for session approval, fixing method errors in WalletConnect integration.

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)
  • 4ecd1a9: Fix walletconnect method error
Files Processed (1)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/Utils.kt (1 hunk)
Actionable Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/Utils.kt [36-36]

    possible issue: "Potential validation bypass in session approval"

Skipped Comments (0)

Sign.Params.Approve(
proposerPublicKey = proposerPublicKey,
namespaces = sessionNamespaces
namespaces = namespaces
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Directly using the provided namespaces without validation through generateApprovedNamespaces() might bypass important namespace validation or transformation logic. Consider documenting why this validation is no longer needed or ensure the incoming namespaces are properly validated elsewhere.

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/manager/walletconnect/Utils.kt (2 hunks)
Actionable Comments (0)
Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/Utils.kt [32-38]

    enhancement: "Error handling could be improved for session approval failure"

@lmcmz lmcmz merged commit e4fa91b into develop Jun 10, 2025
3 checks passed
@lmcmz lmcmz deleted the hotfix/wc-payer branch June 10, 2025 00:14
@lmcmz lmcmz mentioned this pull request Jun 10, 2025
5 tasks
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.

No description entered by the user.

2 participants