1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #12317 from MetaMask/Version-v10.2.1

Version v10.2.1 RC
This commit is contained in:
ryanml 2021-10-09 00:50:26 -07:00 committed by GitHub
commit 0512b9c9f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 61 additions and 128 deletions

View File

@ -3,7 +3,9 @@
set -u
set -o pipefail
yarn audit --level moderate --groups dependencies
# use `improved-yarn-audit` since that allows for exclude
# exclude 1002401 until we remove use of 3Box, 1002581 until we can find a better solution
yarn run improved-yarn-audit --ignore-dev-deps --min-severity moderate --exclude 1002401,1002581
audit_status="$?"
# Use a bitmask to ignore INFO and LOW severity audit results

View File

@ -29,6 +29,7 @@ ignores:
- "source-map-explorer"
# development tool
- "yarn-deduplicate"
- "improved-yarn-audit"
# storybook
- "@storybook/core"
- "@storybook/addon-backgrounds"

View File

@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [10.2.1]
### Fixed
- [#12315](https://github.com/MetaMask/metamask-extension/pull/12315): Fix ERC-20 token swaps
- [#12284](https://github.com/MetaMask/metamask-extension/pull/12284): Restoring notice regarding mobile sync status to sync page
## [10.2.0]
### Added
- [#12066](https://github.com/MetaMask/metamask-extension/pull/12066): Enable token conversion rates for primary currencies on some non-Mainnet networks
@ -2489,7 +2494,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Uncategorized
- Added the ability to restore accounts from seed words.
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.2.0...HEAD
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.2.1...HEAD
[10.2.1]: https://github.com/MetaMask/metamask-extension/compare/v10.2.0...v10.2.1
[10.2.0]: https://github.com/MetaMask/metamask-extension/compare/v10.1.1...v10.2.0
[10.1.1]: https://github.com/MetaMask/metamask-extension/compare/v10.1.0...v10.1.1
[10.1.0]: https://github.com/MetaMask/metamask-extension/compare/v10.0.3...v10.1.0

View File

@ -1362,7 +1362,7 @@
"message": "Don't see your token?"
},
"mobileSyncWarning": {
"message": "⚠️ Proceeding will display a secret QR code that allows access to your accounts. Do not share it with anyone. Support staff will never ask you for it."
"message": "The 'Sync with extension' feature is temporarily disabled. If you want to use your extension wallet on MetaMask mobile, then on your mobile app: go back to the wallet setup options and select the 'Import with Secret Recovery Phrase' option. Use your extension wallet's secret phrase to then import your wallet into mobile."
},
"mustSelectOne": {
"message": "Must select at least 1 token."

View File

@ -1,6 +1,6 @@
{
"name": "metamask-crx",
"version": "10.2.0",
"version": "10.2.1",
"private": true,
"repository": {
"type": "git",
@ -84,7 +84,7 @@
"3box/ipfs/prometheus-gc-stats/gc-stats/node-pre-gyp/tar": "^6.1.2",
"3box/**/libp2p-crypto/node-forge": "^0.10.0",
"3box/**/libp2p-keychain/node-forge": "^0.10.0",
"analytics-node/axios": "^0.21.1",
"analytics-node/axios": "^0.21.2",
"ganache-core/lodash": "^4.17.21",
"netmask": "^2.0.1",
"pubnub/superagent-proxy": "^3.0.0",
@ -112,7 +112,7 @@
"@metamask/post-message-stream": "^4.0.0",
"@metamask/providers": "^8.1.1",
"@popperjs/core": "^2.4.0",
"@reduxjs/toolkit": "^1.5.0",
"@reduxjs/toolkit": "^1.6.2",
"@sentry/browser": "^5.26.0",
"@sentry/integrations": "^5.26.0",
"@zxing/library": "^0.8.0",
@ -155,7 +155,7 @@
"fuse.js": "^3.2.0",
"globalthis": "^1.0.1",
"human-standard-token-abi": "^2.0.0",
"immer": "^8.0.1",
"immer": "^9.0.6",
"json-rpc-engine": "^6.1.0",
"json-rpc-middleware-stream": "^2.1.1",
"jsonschema": "^1.2.4",
@ -283,6 +283,7 @@
"gulp-watch": "^5.0.1",
"gulp-zip": "^4.0.0",
"history": "^5.0.0",
"improved-yarn-audit": "^2.3.3",
"jest": "^26.6.3",
"jsdom": "^11.2.0",
"koa": "^2.7.0",

File diff suppressed because one or more lines are too long

View File

@ -51,7 +51,10 @@ import {
hexToDecimal,
} from '../../../helpers/utils/conversions.util';
import { calcTokenAmount } from '../../../helpers/utils/token-util';
import { getURLHostName } from '../../../helpers/utils/util';
import {
getURLHostName,
isEqualCaseInsensitive,
} from '../../../helpers/utils/util';
import { usePrevious } from '../../../hooks/usePrevious';
import { useTokenTracker } from '../../../hooks/useTokenTracker';
import { useTokenFiatAmount } from '../../../hooks/useTokenFiatAmount';
@ -169,8 +172,9 @@ export default function BuildQuote({
shuffledTokensList,
});
const selectedToToken =
tokensToSearch.find(({ address }) => address === toToken?.address) ||
toToken;
tokensToSearch.find(({ address }) =>
isEqualCaseInsensitive(address, toToken?.address),
) || toToken;
const toTokenIsNotDefault =
selectedToToken?.address &&
!isSwapsDefaultTokenAddress(selectedToToken?.address, chainId);
@ -226,8 +230,8 @@ export default function BuildQuote({
}
if (
token?.address &&
!memoizedUsersTokens.find(
(usersToken) => usersToken.address === token.address,
!memoizedUsersTokens.find((usersToken) =>
isEqualCaseInsensitive(usersToken.address, token.address),
)
) {
fetchTokenBalance(token.address, selectedAccountAddress).then(
@ -298,12 +302,12 @@ export default function BuildQuote({
);
const hideDropdownItemIf = useCallback(
(item) => item.address === fromTokenAddress,
(item) => isEqualCaseInsensitive(item.address, fromTokenAddress),
[fromTokenAddress],
);
const tokensWithBalancesFromToken = tokensWithBalances.find(
(token) => token.address === fromToken?.address,
const tokensWithBalancesFromToken = tokensWithBalances.find((token) =>
isEqualCaseInsensitive(token.address, fromToken?.address),
);
const previousTokensWithBalancesFromToken = usePrevious(
tokensWithBalancesFromToken,
@ -314,9 +318,10 @@ export default function BuildQuote({
tokensWithBalancesFromToken?.address,
chainId,
);
const addressesAreTheSame =
tokensWithBalancesFromToken?.address ===
previousTokensWithBalancesFromToken?.address;
const addressesAreTheSame = isEqualCaseInsensitive(
tokensWithBalancesFromToken?.address,
previousTokensWithBalancesFromToken?.address,
);
const balanceHasChanged =
tokensWithBalancesFromToken?.balance !==
previousTokensWithBalancesFromToken?.balance;
@ -490,7 +495,9 @@ export default function BuildQuote({
!Object.keys(topAssets).length)
}
selectPlaceHolderText={t('swapSelect')}
hideItemIf={(item) => item.address === selectedToToken?.address}
hideItemIf={(item) =>
isEqualCaseInsensitive(item.address, selectedToToken?.address)
}
listContainerClassName="build-quote__open-dropdown"
autoFocus
/>

View File

@ -50,7 +50,10 @@ import {
} from '../../../selectors';
import { getNativeCurrency, getTokens } from '../../../ducks/metamask/metamask';
import { toPrecisionWithoutTrailingZeros } from '../../../helpers/utils/util';
import {
toPrecisionWithoutTrailingZeros,
isEqualCaseInsensitive,
} from '../../../helpers/utils/util';
import {
safeRefetchQuotes,
@ -214,8 +217,8 @@ export default function ViewQuote() {
const balanceToken =
fetchParamsSourceToken === defaultSwapsToken.address
? defaultSwapsToken
: tokensWithBalances.find(
({ address }) => address === fetchParamsSourceToken,
: tokensWithBalances.find(({ address }) =>
isEqualCaseInsensitive(address, fetchParamsSourceToken),
);
const selectedFromToken = balanceToken || usedQuote.sourceTokenInfo;

View File

@ -3029,13 +3029,13 @@
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.4"
"@reduxjs/toolkit@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.5.0.tgz#1025c1ccb224d1fc06d8d98a61f6717d57e6d477"
integrity sha512-E/FUraRx+8guw9Hlg/Ja8jI/hwCrmIKed8Annt9YsZw3BQp+F24t5I5b2OWR6pkEHY4hn1BgP08FrTZFRKsdaQ==
"@reduxjs/toolkit@^1.6.2":
version "1.6.2"
resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.6.2.tgz#2f2b5365df77dd6697da28fdf44f33501ed9ba37"
integrity sha512-HbfI/hOVrAcMGAYsMWxw3UJyIoAS9JTdwddsjlr5w3S50tXhWb+EMyhIw+IAvCVCLETkzdjgH91RjDSYZekVBA==
dependencies:
immer "^8.0.0"
redux "^4.0.0"
immer "^9.0.6"
redux "^4.1.0"
redux-thunk "^2.3.0"
reselect "^4.0.0"
@ -5800,14 +5800,7 @@ axios-retry@^3.0.2:
dependencies:
is-retry-allowed "^1.1.0"
axios@^0.19.2, axios@^0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
dependencies:
follow-redirects "^1.10.0"
axios@^0.21.2:
axios@^0.19.2, axios@^0.21.2:
version "0.21.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"
integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==
@ -12781,11 +12774,6 @@ fnv1a@^1.0.1:
resolved "https://registry.yarnpkg.com/fnv1a/-/fnv1a-1.0.1.tgz#915e2d6d023c43d5224ad9f6d2a3c4156f5712f5"
integrity sha1-kV4tbQI8Q9UiStn20qPEFW9XEvU=
follow-redirects@^1.10.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7"
integrity sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==
follow-redirects@^1.14.0:
version "1.14.3"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.3.tgz#6ada78118d8d24caee595595accdc0ac6abd022e"
@ -14588,11 +14576,6 @@ immer@1.10.0:
resolved "https://registry.yarnpkg.com/immer/-/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d"
integrity sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg==
immer@^8.0.0, immer@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656"
integrity sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA==
immer@^9.0.6:
version "9.0.6"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.6.tgz#7a96bf2674d06c8143e327cbf73539388ddf1a73"
@ -14638,6 +14621,11 @@ import-local@^3.0.2:
pkg-dir "^4.2.0"
resolve-cwd "^3.0.0"
improved-yarn-audit@^2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/improved-yarn-audit/-/improved-yarn-audit-2.3.3.tgz#da0be78be4b678c73733066c9ccd21e1958fae8c"
integrity sha512-chZ7zPKGsA+CZeMExNPf9WZhETJLkC+u8cQlkQC9XyPZqQPctn3FavefTjXBXmX3Azin8WcoAbaok1FvjkLf6A==
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
@ -23495,6 +23483,13 @@ redux@*, redux@^4.0.0, redux@^4.0.1, redux@^4.0.5:
loose-envify "^1.4.0"
symbol-observable "^1.2.0"
redux@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/redux/-/redux-4.1.1.tgz#76f1c439bb42043f985fbd9bf21990e60bd67f47"
integrity sha512-hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw==
dependencies:
"@babel/runtime" "^7.9.2"
reflect.ownkeys@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460"