Commit 91829d6
committed
feat(sdk-coin-algo): verify consolidation transaction
Implement verification to ensure consolidation transactions send funds to
the wallet's base address (rootAddress). This prevents malicious transactions
from redirecting consolidated funds to unauthorized addresses.
Changes:
- Add consolidationToBaseAddress verification in verifyTransaction method
- Verify transaction recipient matches wallet rootAddress for both native
(pay) and token (axfer) transactions
- Test both positive (valid consolidation) and negative (malicious) cases
The verification is triggered when params.verification.consolidationToBaseAddress
is set to true, which happens automatically in sendAccountConsolidations.
Ticket: WP-5729
TICKET: WP-57291 parent 64a2c84 commit 91829d6
File tree
3 files changed
+507
-4
lines changed- modules/sdk-coin-algo
- src
- test
- fixtures
- unit
3 files changed
+507
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
580 | 581 | | |
581 | 582 | | |
582 | 583 | | |
583 | | - | |
| 584 | + | |
584 | 585 | | |
585 | 586 | | |
586 | 587 | | |
| |||
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
605 | | - | |
| 606 | + | |
| 607 | + | |
606 | 608 | | |
607 | | - | |
| 609 | + | |
| 610 | + | |
608 | 611 | | |
609 | 612 | | |
610 | 613 | | |
611 | | - | |
| 614 | + | |
612 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
613 | 640 | | |
614 | 641 | | |
615 | 642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
0 commit comments