File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Changed
11+
12+ - ** BREAKING:** Rename ` getGroupIndexFromMultichainAccountId ` to ` getGroupIndexFromMultichainAccountGroupId ` ([ #336 ] ( https://github.com/MetaMask/accounts/pull/336 ) )
13+ - This function was not following the same naming convention (this is an oversight from previous release).
14+
1015## [ 0.6.0]
1116
1217### Changed
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export function isMultichainAccountGroupId(
9595 * @param id - Multichain account ID.
9696 * @returns The multichain account index if extractable, undefined otherwise.
9797 */
98- export function getGroupIndexFromMultichainAccountId (
98+ export function getGroupIndexFromMultichainAccountGroupId (
9999 id : MultichainAccountGroupId ,
100100) : number {
101101 const matched = id . match ( MULTICHAIN_ACCOUNT_GROUP_ID_REGEX ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import {
1515 toAccountGroupId ,
1616 toAccountWalletId ,
1717 toDefaultAccountGroupId ,
18- getGroupIndexFromMultichainAccountId ,
18+ getGroupIndexFromMultichainAccountGroupId ,
1919 isBip44Account ,
2020 toMultichainAccountWalletId ,
2121 toMultichainAccountGroupId ,
@@ -163,15 +163,17 @@ describe('index', () => {
163163 const walletId = toMultichainAccountWalletId ( 'test' ) ;
164164 const groupId = toMultichainAccountGroupId ( walletId , groupIndex ) ;
165165
166- expect ( getGroupIndexFromMultichainAccountId ( groupId ) ) . toBe ( groupIndex ) ;
166+ expect ( getGroupIndexFromMultichainAccountGroupId ( groupId ) ) . toBe (
167+ groupIndex ,
168+ ) ;
167169 } ) ;
168170
169171 it ( 'throws if it cannot extract group index' , ( ) => {
170172 const walletId = toAccountWalletId ( AccountWalletType . Keyring , 'test' ) ;
171173 const groupId = toAccountGroupId ( walletId , 'test' ) ;
172174
173175 expect ( ( ) =>
174- getGroupIndexFromMultichainAccountId (
176+ getGroupIndexFromMultichainAccountGroupId (
175177 // Force the error case even though, type wise, this should not
176178 // be possible!
177179 groupId as unknown as MultichainAccountGroupId ,
You can’t perform that action at this time.
0 commit comments