Skip to content

test: cover PhishingProtection decode & analyser methods (#466) - #555

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
gbengaeben:fix/466-phishing-decode-tests
Jun 28, 2026
Merged

test: cover PhishingProtection decode & analyser methods (#466)#555
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
gbengaeben:fix/466-phishing-decode-tests

Conversation

@gbengaeben

Copy link
Copy Markdown
Contributor

Summary

Adds comprehensive test coverage for the previously untested private methods in PhishingProtection:

  • decodeTransactionData: Tests for method selector extraction, params handling, empty data, and edge cases (approve/withdraw/transfer selectors)
  • analyzeTransactionParameters: Tests for normal params, large params detection (>1000 chars), null/undefined handling, missing params property, boundary cases
  • Integration tests: Validate that validateTransactionData properly chains through decode and analyze for large params and different function selectors

Changes

  • Added 16 new test cases across 3 new describe blocks
  • Fixed boundary assertion for analyzeTransactionParameters (1000 chars exactly = no flag)
  • All existing + new tests: 46 tests passing

Closes #466

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@gbengaeben Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Copy link
Copy Markdown
Contributor

Test coverage looks great. Merging.

@nanaf6203-bit
nanaf6203-bit merged commit f696460 into MettaChain:main Jun 28, 2026
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.

testing: cover PhishingProtection decode & analyser methods

2 participants