- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 252
fix(multichain-account-service): fix Tron addresses not being generated for all BIP44 accounts #7010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(multichain-account-service): fix Tron addresses not being generated for all BIP44 accounts #7010
Conversation
571281b    to
    804dfda      
    Compare
  
    804dfda    to
    567927b      
    Compare
  
    | import type { EntropySourceId, KeyringAccount } from '@metamask/keyring-api'; | ||
| import { TrxAccountType, TrxScope } from '@metamask/keyring-api'; | ||
| import { KeyringAccountEntropyTypeOption } from '@metamask/keyring-api'; | ||
| // import { KeyringAccountEntropyTypeOption } from '@metamask/keyring-api'; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this 🧹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol i have it locally and didn't push
fbe9b1b    to
    5415155      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! That looks really better now, thanks 💪
| We forgot the changelog (I thought this was enforced by the CI, I'm a bit confused by that 😅) Anyway, @ulissesferreira can you please make another PR for this? | 
## Explanation Forgotten changelog ## References #7010 ## Checklist - [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 communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Update `packages/multichain-account-service/CHANGELOG.md` to note a fix: TRX account creation now uses `groupIndex` instead of `derivationPath`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 94ccbb1. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Explanation
We have stopped using derivation paths for account creation, only using the field
groupIndex. We had made this change on the Snap side but we didn't really change the TronProvider to match.References
NWNT-646
Checklist
Note
Switch Tron account creation to index-based flow and wire discovery via KeyringClient, updating tests accordingly.
index-basedcreateAccounts, passingaddressType: Eoaandscope: Mainnet.assertIsBip44Account.discoverAccountsnow callsKeyringClient.discoverAccountsand then invokescreateAccountswithgroupIndex.TrxAccountProvider.test.ts):createAccountto accept{ index }and ensure idempotency bygroupIndex.discoverAccountsmock and routekeyring_discoverAccountsthroughSnapController:handleRequest.Written by Cursor Bugbot for commit 5415155. This will update automatically on new commits. Configure here.