Skip to content

Commit 499b800

Browse files
committed
Merge branch 'mikesposito/bump-keyrings' into chore/upgrade-ethereumjs
2 parents 9823377 + b8f2930 commit 499b800

File tree

29 files changed

+318
-163
lines changed

29 files changed

+318
-163
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/core-monorepo",
3-
"version": "311.0.0",
3+
"version": "313.0.0",
44
"private": true,
55
"description": "Monorepo for packages shared between MetaMask clients",
66
"repository": {

packages/accounts-controller/CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [24.1.0]
11+
1012
### Changed
1113

1214
- Bump `@ethereumjs/util` from `^8.1.0` to `^9.1.0` ([#5347](https://github.com/MetaMask/core/pull/5347))
13-
- Use `account.scopes` in `listMultichainAccounts` ([#5357](https://github.com/MetaMask/core/pull/5357))
15+
- Use `account.scopes` in `listMultichainAccounts` ([#5388](https://github.com/MetaMask/core/pull/5388))
1416
- The previous logic was fragile and was relying on the account's type mainly.
1517

1618
## [24.0.1]
@@ -471,7 +473,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
471473

472474
- Initial release ([#1637](https://github.com/MetaMask/core/pull/1637))
473475

474-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@24.0.1...HEAD
476+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@24.1.0...HEAD
477+
[24.1.0]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@24.0.1...@metamask/accounts-controller@24.1.0
475478
[24.0.1]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@24.0.0...@metamask/accounts-controller@24.0.1
476479
[24.0.0]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@23.1.0...@metamask/accounts-controller@24.0.0
477480
[23.1.0]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@23.0.1...@metamask/accounts-controller@23.1.0

packages/accounts-controller/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/accounts-controller",
3-
"version": "24.0.1",
3+
"version": "24.1.0",
44
"description": "Manages internal accounts",
55
"keywords": [
66
"MetaMask",
@@ -51,7 +51,7 @@
5151
"@metamask/base-controller": "^8.0.0",
5252
"@metamask/eth-snap-keyring": "^11.1.0",
5353
"@metamask/keyring-api": "^17.2.0",
54-
"@metamask/keyring-internal-api": "^4.0.3",
54+
"@metamask/keyring-internal-api": "^5.0.0",
5555
"@metamask/keyring-utils": "^2.3.1",
5656
"@metamask/network-controller": "^22.2.1",
5757
"@metamask/snaps-sdk": "^6.17.1",

packages/accounts-controller/src/AccountsController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ export class AccountsController extends BaseController<
474474
};
475475
// Do not remove this comment - This error is flaky: Comment out or restore the `ts-expect-error` directive below as needed.
476476
// See: https://github.com/MetaMask/utils/issues/168
477-
// // @ts-expect-error Known issue - `Json` causes recursive error in immer `Draft`/`WritableDraft` types
477+
// @ts-expect-error Known issue - `Json` causes recursive error in immer `Draft`/`WritableDraft` types
478478
currentState.internalAccounts.accounts[accountId] = internalAccount;
479479

480480
if (metadata.name) {

packages/assets-controllers/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@
7777
},
7878
"devDependencies": {
7979
"@babel/runtime": "^7.23.9",
80-
"@metamask/accounts-controller": "^24.0.1",
80+
"@metamask/accounts-controller": "^24.1.0",
8181
"@metamask/approval-controller": "^7.1.3",
8282
"@metamask/auto-changelog": "^3.4.4",
8383
"@metamask/ethjs-provider-http": "^0.3.0",
8484
"@metamask/keyring-controller": "^19.2.1",
85-
"@metamask/keyring-internal-api": "^4.0.3",
85+
"@metamask/keyring-internal-api": "^5.0.0",
8686
"@metamask/keyring-snap-client": "^4.0.1",
8787
"@metamask/network-controller": "^22.2.1",
8888
"@metamask/permission-controller": "^11.0.6",

packages/assets-controllers/src/crypto-compare-service/crypto-compare.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ describe('CryptoCompare', () => {
150150
expect(conversionRate).toBe(123);
151151
});
152152

153+
it('should override currency symbol when the CryptoCompare identifier is different', async () => {
154+
nock(cryptoCompareHost)
155+
.get('/data/price?fsym=USD&tsyms=MANTLE')
156+
.reply(200, { MANTLE: 1234 });
157+
158+
const { conversionRate } = await fetchExchangeRate('MNT', 'USD');
159+
expect(conversionRate).toBe(1234);
160+
});
161+
153162
describe('fetchMultiExchangeRate', () => {
154163
it('should return CAD and USD conversion rate for BTC, ETH, and SOL', async () => {
155164
nock(cryptoCompareHost)

packages/assets-controllers/src/crypto-compare-service/crypto-compare.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ function getPricingURL(
2929
nativeCurrency: string,
3030
includeUSDRate?: boolean,
3131
) {
32-
nativeCurrency = nativeCurrency.toUpperCase();
33-
const fsym = nativeSymbolOverrides.get(nativeCurrency) ?? nativeCurrency;
3432
return (
3533
`${CRYPTO_COMPARE_DOMAIN}/data/price?fsym=` +
36-
`${fsym}&tsyms=${currentCurrency.toUpperCase()}` +
34+
`${nativeCurrency}&tsyms=${currentCurrency}` +
3735
`${includeUSDRate && currentCurrency.toUpperCase() !== 'USD' ? ',USD' : ''}`
3836
);
3937
}
@@ -100,6 +98,11 @@ export async function fetchExchangeRate(
10098
conversionRate: number;
10199
usdConversionRate: number;
102100
}> {
101+
currency = currency.toUpperCase();
102+
nativeCurrency = nativeCurrency.toUpperCase();
103+
currency = nativeSymbolOverrides.get(currency) ?? currency;
104+
nativeCurrency = nativeSymbolOverrides.get(nativeCurrency) ?? nativeCurrency;
105+
103106
const json = await handleFetch(
104107
getPricingURL(currency, nativeCurrency, includeUSDRate),
105108
);

packages/bridge-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"ethers": "^6.12.0"
5656
},
5757
"devDependencies": {
58-
"@metamask/accounts-controller": "^24.0.1",
58+
"@metamask/accounts-controller": "^24.1.0",
5959
"@metamask/auto-changelog": "^3.4.4",
6060
"@metamask/eth-json-rpc-provider": "^4.1.8",
6161
"@metamask/network-controller": "^22.2.1",

packages/bridge-status-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@metamask/utils": "^11.2.0"
5555
},
5656
"devDependencies": {
57-
"@metamask/accounts-controller": "^24.0.1",
57+
"@metamask/accounts-controller": "^24.1.0",
5858
"@metamask/auto-changelog": "^3.4.4",
5959
"@metamask/network-controller": "^22.2.1",
6060
"@metamask/transaction-controller": "^46.0.0",

packages/earn-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@metamask/stake-sdk": "^1.0.0"
5454
},
5555
"devDependencies": {
56-
"@metamask/accounts-controller": "^24.0.1",
56+
"@metamask/accounts-controller": "^24.1.0",
5757
"@metamask/auto-changelog": "^3.4.4",
5858
"@metamask/network-controller": "^22.2.1",
5959
"@types/jest": "^27.4.1",

0 commit comments

Comments
 (0)