Skip to content

fix: restore the constructor of the account proof encode method#887

Merged
jaymengxy merged 1 commit intodevelopfrom
fix_account_proof
Apr 30, 2025
Merged

fix: restore the constructor of the account proof encode method#887
jaymengxy merged 1 commit intodevelopfrom
fix_account_proof

Conversation

@jaymengxy
Copy link
Copy Markdown
Contributor

Related Issue

Closes #886

Summary of Changes

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

@jaymengxy jaymengxy self-assigned this Apr 28, 2025
@jaymengxy jaymengxy requested a review from a team as a code owner April 28, 2025 03:55
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2025

PR Summary

Restored the account proof encoding functionality by adding missing required parameters to the constructor. The fix addresses a critical issue where appIdentifier was not being properly included in the account proof encoding process, which could affect authentication and security. The changes ensure proper RLP encoding of account proofs with all necessary fields: appIdentifier, address, and nonce.

Changes

File Summary
app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectResponse.kt Added missing appIdentifier parameter to encodeAccountProof() function call, ensuring proper account proof generation for wallet connect responses.
app/src/main/java/com/flowfoundation/wallet/widgets/webview/fcl/Utils.kt Enhanced AccountProof class with proper constructor parameters (appIdentifier, address, nonce) and RLP annotations. Updated encoding methods to properly handle all required fields and added necessary byte conversion utilities.

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)
  • 76edcc3: fix: restore the constructor of the account proof encode method
Files Processed (2)
  • app/src/main/java/com/flowfoundation/wallet/manager/walletconnect/WalletConnectResponse.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/widgets/webview/fcl/Utils.kt (1 hunk)
Actionable Comments (0)
Skipped Comments (3)
  • app/src/main/java/com/flowfoundation/wallet/widgets/webview/fcl/Utils.kt [31-31]

    readability: "Variable name has a typo"

  • app/src/main/java/com/flowfoundation/wallet/widgets/webview/fcl/Utils.kt [34-35]

    maintainability: "Inconsistent variable reference"

  • app/src/main/java/com/flowfoundation/wallet/widgets/webview/fcl/Utils.kt [38-42]

    enhancement: "Missing data class for immutable data structure"

@jaymengxy jaymengxy merged commit d2f8d79 into develop Apr 30, 2025
3 checks passed
@jaymengxy jaymengxy deleted the fix_account_proof branch April 30, 2025 03:46
@github-actions github-actions Bot mentioned this pull request May 13, 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.

[BUG] Walletconnect issues

2 participants