Skip to content

Commit

Permalink
Merge pull request #26695 from MetaMask/v12.2.0-sync-with-v12.1.0
Browse files Browse the repository at this point in the history
v12.2.0 sync with v12.1.0
  • Loading branch information
Gudahtt authored Aug 28, 2024
2 parents fc0ee27 + 945b77c commit ab3c6d0
Show file tree
Hide file tree
Showing 242 changed files with 23,276 additions and 3,552 deletions.
18 changes: 15 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ workflows:

jobs:
trigger-beta-build:
executor: node-browsers-small
executor: node-browsers-medium-plus
steps:
- run: *shallow-git-clone
- run: sudo corepack enable
Expand Down Expand Up @@ -377,9 +377,9 @@ jobs:
- builds-beta

create_release_pull_request:
executor: node-browsers-small
executor: node-browsers-medium
steps:
- run: *shallow-git-clone
- checkout
- run: sudo corepack enable
- attach_workspace:
at: .
Expand Down Expand Up @@ -1516,6 +1516,12 @@ jobs:
command: |
echo "export PARENT_COMMIT=$(git merge-base origin/HEAD HEAD)" >> $BASH_ENV
source $BASH_ENV
- run:
name: Set commit message env var
command: |
commit_title=$(git show -s --format='%s' HEAD)
echo "export SHA1_COMMIT_TITLE=\"$commit_title\"" >> $BASH_ENV
source $BASH_ENV
- run:
name: build:announce
command: ./development/metamaskbot-build-announce.js
Expand All @@ -1530,9 +1536,15 @@ jobs:
- run:
name: Publish main release to Sentry
command: yarn sentry:publish
- run:
name: Publish main MV2 release to Sentry
command: yarn sentry:publish --dist mv2
- run:
name: Publish Flask release to Sentry
command: yarn sentry:publish --build-type flask
- run:
name: Publish Flask MV2 release to Sentry
command: yarn sentry:publish --build-type flask --dist mv2
- run:
name: Publish MMI release to Sentry
command: yarn sentry:publish --build-type mmi
Expand Down
2 changes: 1 addition & 1 deletion .circleci/scripts/release-create-gh-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ then
install_github_cli

printf '%s\n' 'Creating GitHub Release'
release_body="$(awk -v version="${tag##v}" -f .circleci/scripts/show-changelog.awk CHANGELOG.md)"
release_body="$(awk -v version="[${tag##v}]" -f .circleci/scripts/show-changelog.awk CHANGELOG.md)"
hub release create \
--attach builds/metamask-chrome-*.zip \
--attach builds-mv2/metamask-firefox-*.zip \
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ jobs:
git config --global user.email '[email protected]'
git commit -am "Update Attributions"
git push
env:
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
- name: Post comment
run: |
if [[ $HAS_CHANGES == 'true' ]]
Expand Down
7 changes: 6 additions & 1 deletion .metamaskrc.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ BLOCKAID_PUBLIC_KEY=
; Set this to true to enable the snap path for the Firefox WebDriver (Linux)
; FIREFOX_SNAP=

ENABLE_CONFIRMATION_REDESIGN=
; Enable the redesigned confirmations still in development, without needing to toggle the developer setting.
; ENABLE_CONFIRMATION_REDESIGN=

; URL of security alerts API used to validate dApp requests
; SECURITY_ALERTS_API_URL='http://localhost:3000'
Expand All @@ -34,3 +35,7 @@ ENABLE_CONFIRMATION_REDESIGN=

; Enables the Settings Page - Developer Options
; ENABLE_SETTINGS_PAGE_DEV_OPTIONS=true

; The endpoint used to submit errors and tracing data to Sentry.
; The below is the `test-metamask` project.
; SENTRY_DSN_DEV=https://[email protected]/273496
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
diff --git a/dist/chunk-FGAZXVKS.js b/dist/chunk-FGAZXVKS.js
index 4a6aa7918599269951044b9f8c7c076a7fe6a9c7..4c1054a867ff6aef1e26f8d84e2831f234c4e44e 100644
--- a/dist/chunk-FGAZXVKS.js
+++ b/dist/chunk-FGAZXVKS.js
@@ -503,6 +503,7 @@ fetchAndMapExchangeRatesForUnsupportedNativeCurrency_fn = async function({
if (fallbackCurrencyToNativeCurrencyConversionRate === null) {
return {};
}
+ const convertFallbackToNative = (value) => value !== void 0 && value !== null ? value * fallbackCurrencyToNativeCurrencyConversionRate : void 0;
const updatedContractExchangeRates = Object.entries(
contractExchangeInformations
).reduce((acc, [tokenAddress, token]) => {
@@ -510,7 +511,15 @@ fetchAndMapExchangeRatesForUnsupportedNativeCurrency_fn = async function({
...acc,
[tokenAddress]: {
...token,
- price: token.price ? token.price * fallbackCurrencyToNativeCurrencyConversionRate : void 0
+ currency: nativeCurrency,
+ price: convertFallbackToNative(token.price),
+ marketCap: convertFallbackToNative(token.marketCap),
+ allTimeHigh: convertFallbackToNative(token.allTimeHigh),
+ allTimeLow: convertFallbackToNative(token.allTimeLow),
+ totalVolume: convertFallbackToNative(token.totalVolume),
+ high1d: convertFallbackToNative(token.high1d),
+ low1d: convertFallbackToNative(token.low1d),
+ dilutedMarketCap: convertFallbackToNative(token.dilutedMarketCap)
}
};
return acc;
diff --git a/dist/chunk-P3O5CVAH.mjs b/dist/chunk-P3O5CVAH.mjs
index 32379704450baee58a37623b1d0f6b471e69de2e..069c3deec15ad85057c910ecf0db31d856fd6ae2 100644
--- a/dist/chunk-P3O5CVAH.mjs
+++ b/dist/chunk-P3O5CVAH.mjs
@@ -503,6 +503,7 @@ fetchAndMapExchangeRatesForUnsupportedNativeCurrency_fn = async function({
if (fallbackCurrencyToNativeCurrencyConversionRate === null) {
return {};
}
+ const convertFallbackToNative = (value) => value !== void 0 && value !== null ? value * fallbackCurrencyToNativeCurrencyConversionRate : void 0;
const updatedContractExchangeRates = Object.entries(
contractExchangeInformations
).reduce((acc, [tokenAddress, token]) => {
@@ -510,7 +511,15 @@ fetchAndMapExchangeRatesForUnsupportedNativeCurrency_fn = async function({
...acc,
[tokenAddress]: {
...token,
- price: token.price ? token.price * fallbackCurrencyToNativeCurrencyConversionRate : void 0
+ currency: nativeCurrency,
+ price: convertFallbackToNative(token.price),
+ marketCap: convertFallbackToNative(token.marketCap),
+ allTimeHigh: convertFallbackToNative(token.allTimeHigh),
+ allTimeLow: convertFallbackToNative(token.allTimeLow),
+ totalVolume: convertFallbackToNative(token.totalVolume),
+ high1d: convertFallbackToNative(token.high1d),
+ low1d: convertFallbackToNative(token.low1d),
+ dilutedMarketCap: convertFallbackToNative(token.dilutedMarketCap)
}
};
return acc;
Loading

0 comments on commit ab3c6d0

Please sign in to comment.