Commit d785af7
fix: update transaction controllers to use selected account (#4244)
This pr updates the transaction controller to use account id from the
InternalAccount instead of an address
Related to https://github.com/MetaMask/accounts-planning/issues/381
- **BREAKING**: `getSelectedAddress` is replaced with
`getSelectedAccount` in the `TransactionController`
- **BREAKING**: `getCurrentAccount` returns an `InternalAccount` instead
of a `string` in the `IncomingTransactionHelper`
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
Fixes https://github.com/MetaMask/accounts-planning/issues/381
---------
Co-authored-by: Charly Chevalier <[email protected]>1 parent 6afa236 commit d785af7
File tree
9 files changed
+245
-66
lines changed- packages/transaction-controller
- src
- helpers
9 files changed
+245
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
439 | 441 | | |
440 | 442 | | |
441 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
442 | 458 | | |
443 | 459 | | |
444 | 460 | | |
| |||
551 | 567 | | |
552 | 568 | | |
553 | 569 | | |
| 570 | + | |
554 | 571 | | |
555 | 572 | | |
556 | 573 | | |
557 | 574 | | |
558 | 575 | | |
559 | 576 | | |
| 577 | + | |
560 | 578 | | |
561 | 579 | | |
562 | 580 | | |
| |||
565 | 583 | | |
566 | 584 | | |
567 | 585 | | |
| 586 | + | |
568 | 587 | | |
569 | 588 | | |
570 | 589 | | |
| |||
587 | 606 | | |
588 | 607 | | |
589 | 608 | | |
590 | | - | |
591 | 609 | | |
592 | 610 | | |
593 | 611 | | |
| |||
605 | 623 | | |
606 | 624 | | |
607 | 625 | | |
| 626 | + | |
608 | 627 | | |
609 | 628 | | |
610 | 629 | | |
611 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
612 | 637 | | |
613 | 638 | | |
614 | 639 | | |
| |||
618 | 643 | | |
619 | 644 | | |
620 | 645 | | |
| 646 | + | |
621 | 647 | | |
622 | 648 | | |
623 | 649 | | |
| |||
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
300 | | - | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| |||
614 | 615 | | |
615 | 616 | | |
616 | 617 | | |
617 | | - | |
618 | | - | |
619 | 618 | | |
620 | 619 | | |
621 | 620 | | |
| |||
733 | 732 | | |
734 | 733 | | |
735 | 734 | | |
736 | | - | |
737 | 735 | | |
738 | 736 | | |
739 | 737 | | |
| |||
761 | 759 | | |
762 | 760 | | |
763 | 761 | | |
764 | | - | |
765 | 762 | | |
766 | 763 | | |
767 | 764 | | |
| |||
802 | 799 | | |
803 | 800 | | |
804 | 801 | | |
805 | | - | |
806 | 802 | | |
807 | 803 | | |
808 | 804 | | |
| |||
1035 | 1031 | | |
1036 | 1032 | | |
1037 | 1033 | | |
1038 | | - | |
| 1034 | + | |
1039 | 1035 | | |
1040 | 1036 | | |
1041 | 1037 | | |
| |||
3430 | 3426 | | |
3431 | 3427 | | |
3432 | 3428 | | |
3433 | | - | |
| 3429 | + | |
3434 | 3430 | | |
3435 | 3431 | | |
3436 | 3432 | | |
| |||
3843 | 3839 | | |
3844 | 3840 | | |
3845 | 3841 | | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
3846 | 3846 | | |
0 commit comments