-
Notifications
You must be signed in to change notification settings - Fork 5.4k
release: 13.10.1 #38086
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
Merged
+182
−17
Merged
release: 13.10.1 #38086
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
048d784
bump semvar version to 13.10.1
metamaskbot e377454
release(runway): cherry-pick fix: cp-13.10.1 prevent account list fro…
runway-github[bot] eea4d3d
fix: dapp-swap comparison fiat rate fetching for native tokens (#38108)
jpuri 8f631e6
release(runway): cherry-pick fix: dapp swap fix conversion rate for…
runway-github[bot] 8a53979
release(runway): cherry-pick fix: patch TokenBalancesController to r…
runway-github[bot] e97c9f7
release: release/13.10.1-Changelog (#38085)
metamaskbot fb60f40
release(runway): cherry-pick fix: Remove `tabs` permission to avoid n…
runway-github[bot] e3a108b
Merge branch 'stable' into release/13.10.1
gauthierpetetin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
.yarn/patches/@metamask-assets-controllers-npm-88.0.0-3dfc0ab8f1.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| diff --git a/dist/TokenBalancesController.cjs b/dist/TokenBalancesController.cjs | ||
| index 24c2b2d22d3678352fd2ea4932181f3f11ffe41a..e63d3bcd80d68391d713394ec7f340b80fd8b79d 100644 | ||
| --- a/dist/TokenBalancesController.cjs | ||
| +++ b/dist/TokenBalancesController.cjs | ||
| @@ -527,14 +527,16 @@ class TokenBalancesController extends (0, polling_controller_1.StaticIntervalPol | ||
| } | ||
| // Update with actual fetched balances only if the value has changed | ||
| aggregated.forEach(({ success, value, account, token, chainId }) => { | ||
| - var _a, _b, _c; | ||
| + var _a, _b; | ||
| if (success && value !== undefined) { | ||
| + // Ensure all accounts we add/update are in lower-case | ||
| + const lowerCaseAccount = account.toLowerCase(); | ||
| const newBalance = (0, controller_utils_1.toHex)(value); | ||
| const tokenAddress = checksum(token); | ||
| - const currentBalance = d.tokenBalances[account]?.[chainId]?.[tokenAddress]; | ||
| + const currentBalance = d.tokenBalances[lowerCaseAccount]?.[chainId]?.[tokenAddress]; | ||
| // Only update if the balance has actually changed | ||
| if (currentBalance !== newBalance) { | ||
| - ((_c = ((_a = d.tokenBalances)[_b = account] ?? (_a[_b] = {})))[chainId] ?? (_c[chainId] = {}))[tokenAddress] = newBalance; | ||
| + ((_b = ((_a = d.tokenBalances)[lowerCaseAccount] ?? (_a[lowerCaseAccount] = {})))[chainId] ?? (_b[chainId] = {}))[tokenAddress] = newBalance; | ||
| } | ||
| } | ||
| }); | ||
| diff --git a/dist/TokenBalancesController.mjs b/dist/TokenBalancesController.mjs | ||
| index 420934fb16ed6151b5b80fb7be04f81352b4aaf4..d735379adcaf77cbd46b4659f9bfd32046abebdf 100644 | ||
| --- a/dist/TokenBalancesController.mjs | ||
| +++ b/dist/TokenBalancesController.mjs | ||
| @@ -523,14 +523,16 @@ export class TokenBalancesController extends StaticIntervalPollingController() { | ||
| } | ||
| // Update with actual fetched balances only if the value has changed | ||
| aggregated.forEach(({ success, value, account, token, chainId }) => { | ||
| - var _a, _b, _c; | ||
| + var _a, _b; | ||
| if (success && value !== undefined) { | ||
| + // Ensure all accounts we add/update are in lower-case | ||
| + const lowerCaseAccount = account.toLowerCase(); | ||
| const newBalance = toHex(value); | ||
| const tokenAddress = checksum(token); | ||
| - const currentBalance = d.tokenBalances[account]?.[chainId]?.[tokenAddress]; | ||
| + const currentBalance = d.tokenBalances[lowerCaseAccount]?.[chainId]?.[tokenAddress]; | ||
| // Only update if the balance has actually changed | ||
| if (currentBalance !== newBalance) { | ||
| - ((_c = ((_a = d.tokenBalances)[_b = account] ?? (_a[_b] = {})))[chainId] ?? (_c[chainId] = {}))[tokenAddress] = newBalance; | ||
| + ((_b = ((_a = d.tokenBalances)[lowerCaseAccount] ?? (_a[lowerCaseAccount] = {})))[chainId] ?? (_b[chainId] = {}))[tokenAddress] = newBalance; | ||
| } | ||
| } | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,7 +77,6 @@ | |
| "notifications", | ||
| "scripting", | ||
| "storage", | ||
| "tabs", | ||
| "unlimitedStorage", | ||
| "webRequest", | ||
| "offscreen", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Bug: Missing rate for Polygon native asset
The code copies the exchange rate from
POLYGON_NATIVE_ASSETto the native address when on Polygon, but doesn't ensurePOLYGON_NATIVE_ASSETis in thetokenAddressesarray. Since native addresses are filtered out before fetching rates, ifPOLYGON_NATIVE_ASSETisn't in the originaltokenAddresses,exchangeRates[POLYGON_NATIVE_ASSET]will be undefined, causing the native address to have an undefined rate. This breaks the intended functionality of providing rates for native tokens on Polygon.