mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Merge pull request #10158 from MetaMask/Version-v8.1.11
Version v8.1.11 RC
This commit is contained in:
commit
02f3916280
@ -2,6 +2,9 @@
|
||||
|
||||
## Current Develop Branch
|
||||
|
||||
## 8.1.11 Thu Jan 07 2021
|
||||
- [#10155](https://github.com/MetaMask/metamask-extension/pull/10155): Disable swaps when the current network's chainId does not match the mainnet chain ID, instead of disabling based on network ID
|
||||
|
||||
## 8.1.10 Fri Dec 18 2020
|
||||
- [#10084](https://github.com/MetaMask/metamask-extension/pull/10084): Set last provider when switching to a customRPC
|
||||
- [#10096](https://github.com/MetaMask/metamask-extension/pull/10096): Update `@metamask/controllers` to v5.1.0
|
||||
|
@ -78,6 +78,6 @@
|
||||
"notifications"
|
||||
],
|
||||
"short_name": "__MSG_appName__",
|
||||
"version": "8.1.10",
|
||||
"version": "8.1.11",
|
||||
"web_accessible_resources": ["inpage.js", "phishing.html"]
|
||||
}
|
||||
|
@ -67,7 +67,8 @@
|
||||
"3box/ipfs/ipld-zcash/zcash-bitcore-lib/elliptic": "^6.5.3",
|
||||
"3box/**/libp2p-crypto/node-forge": "^0.10.0",
|
||||
"3box/**/libp2p-keychain/node-forge": "^0.10.0",
|
||||
"browserify-derequire/derequire": "^2.1.1"
|
||||
"browserify-derequire/derequire": "^2.1.1",
|
||||
"analytics-node/axios": "^0.21.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"3box": "^1.10.2",
|
||||
|
@ -23,7 +23,7 @@ import {
|
||||
isBalanceCached,
|
||||
getSelectedAccount,
|
||||
getShouldShowFiat,
|
||||
getCurrentNetworkId,
|
||||
getCurrentChainId,
|
||||
getCurrentKeyring,
|
||||
} from '../../../selectors/selectors'
|
||||
import SwapIcon from '../../ui/icon/swap-icon.component'
|
||||
@ -34,7 +34,7 @@ import {
|
||||
setSwapsFromToken,
|
||||
} from '../../../ducks/swaps/swaps'
|
||||
import IconButton from '../../ui/icon-button'
|
||||
import { MAINNET_NETWORK_ID } from '../../../../../app/scripts/controllers/network/enums'
|
||||
import { MAINNET_CHAIN_ID } from '../../../../../app/scripts/controllers/network/enums'
|
||||
import WalletOverview from './wallet-overview'
|
||||
|
||||
const EthOverview = ({ className }) => {
|
||||
@ -61,7 +61,7 @@ const EthOverview = ({ className }) => {
|
||||
const showFiat = useSelector(getShouldShowFiat)
|
||||
const selectedAccount = useSelector(getSelectedAccount)
|
||||
const { balance } = selectedAccount
|
||||
const networkId = useSelector(getCurrentNetworkId)
|
||||
const chainId = useSelector(getCurrentChainId)
|
||||
const enteredSwapsEvent = useNewMetricEvent({
|
||||
event: 'Swaps Opened',
|
||||
properties: { source: 'Main View', active_currency: 'ETH' },
|
||||
@ -134,10 +134,10 @@ const EthOverview = ({ className }) => {
|
||||
{swapsEnabled ? (
|
||||
<IconButton
|
||||
className="eth-overview__button"
|
||||
disabled={networkId !== MAINNET_NETWORK_ID}
|
||||
disabled={chainId !== MAINNET_CHAIN_ID}
|
||||
Icon={SwapIcon}
|
||||
onClick={() => {
|
||||
if (networkId === MAINNET_NETWORK_ID) {
|
||||
if (chainId === MAINNET_CHAIN_ID) {
|
||||
enteredSwapsEvent()
|
||||
dispatch(setSwapsFromToken(swapsEthToken))
|
||||
if (usingHardwareWallet) {
|
||||
@ -152,7 +152,7 @@ const EthOverview = ({ className }) => {
|
||||
<Tooltip
|
||||
title={t('onlyAvailableOnMainnet')}
|
||||
position="bottom"
|
||||
disabled={networkId === '1'}
|
||||
disabled={chainId === MAINNET_CHAIN_ID}
|
||||
>
|
||||
{contents}
|
||||
</Tooltip>
|
||||
|
@ -25,9 +25,9 @@ import {
|
||||
import {
|
||||
getAssetImages,
|
||||
getCurrentKeyring,
|
||||
getCurrentNetworkId,
|
||||
getCurrentChainId,
|
||||
} from '../../../selectors/selectors'
|
||||
import { MAINNET_NETWORK_ID } from '../../../../../app/scripts/controllers/network/enums'
|
||||
import { MAINNET_CHAIN_ID } from '../../../../../app/scripts/controllers/network/enums'
|
||||
|
||||
import SwapIcon from '../../ui/icon/swap-icon.component'
|
||||
import SendIcon from '../../ui/icon/overview-send-icon.component'
|
||||
@ -58,7 +58,7 @@ const TokenOverview = ({ className, token }) => {
|
||||
balanceToRender,
|
||||
token.symbol,
|
||||
)
|
||||
const networkId = useSelector(getCurrentNetworkId)
|
||||
const chainId = useSelector(getCurrentChainId)
|
||||
const enteredSwapsEvent = useNewMetricEvent({
|
||||
event: 'Swaps Opened',
|
||||
properties: { source: 'Token View', active_currency: token.symbol },
|
||||
@ -100,10 +100,10 @@ const TokenOverview = ({ className, token }) => {
|
||||
{swapsEnabled ? (
|
||||
<IconButton
|
||||
className="token-overview__button"
|
||||
disabled={networkId !== MAINNET_NETWORK_ID}
|
||||
disabled={chainId !== MAINNET_CHAIN_ID}
|
||||
Icon={SwapIcon}
|
||||
onClick={() => {
|
||||
if (networkId === MAINNET_NETWORK_ID) {
|
||||
if (chainId === MAINNET_CHAIN_ID) {
|
||||
enteredSwapsEvent()
|
||||
dispatch(
|
||||
setSwapsFromToken({
|
||||
@ -125,7 +125,7 @@ const TokenOverview = ({ className, token }) => {
|
||||
<Tooltip
|
||||
title={t('onlyAvailableOnMainnet')}
|
||||
position="bottom"
|
||||
disabled={networkId === '1'}
|
||||
disabled={chainId === MAINNET_CHAIN_ID}
|
||||
>
|
||||
{contents}
|
||||
</Tooltip>
|
||||
|
@ -12,6 +12,7 @@ import { I18nContext } from '../../contexts/i18n'
|
||||
import {
|
||||
getSelectedAccount,
|
||||
getCurrentNetworkId,
|
||||
getCurrentChainId,
|
||||
} from '../../selectors/selectors'
|
||||
import {
|
||||
getFromToken,
|
||||
@ -47,6 +48,7 @@ import {
|
||||
SWAP_FAILED_ERROR,
|
||||
OFFLINE_FOR_MAINTENANCE,
|
||||
} from '../../helpers/constants/swaps'
|
||||
import { MAINNET_CHAIN_ID } from '../../../../app/scripts/controllers/network/enums'
|
||||
|
||||
import {
|
||||
resetBackgroundSwapsState,
|
||||
@ -245,6 +247,11 @@ export default function Swap() {
|
||||
return () => window.removeEventListener('beforeunload', fn)
|
||||
}, [dispatch, isLoadingQuotesRoute])
|
||||
|
||||
const chainId = useSelector(getCurrentChainId)
|
||||
if (chainId !== MAINNET_CHAIN_ID) {
|
||||
return <Redirect to={{ pathname: DEFAULT_ROUTE }} />
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="swaps">
|
||||
<div className="swaps__container">
|
||||
|
22
yarn.lock
22
yarn.lock
@ -4572,12 +4572,12 @@ axios-retry@^3.0.2:
|
||||
dependencies:
|
||||
is-retry-allowed "^1.1.0"
|
||||
|
||||
axios@^0.19.2:
|
||||
version "0.19.2"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
|
||||
integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
|
||||
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.5.10"
|
||||
follow-redirects "^1.10.0"
|
||||
|
||||
babel-code-frame@^6.16.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
|
||||
version "6.26.0"
|
||||
@ -7954,7 +7954,7 @@ debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, de
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@3.1.0, debug@=3.1.0, debug@~3.1.0:
|
||||
debug@3.1.0, debug@~3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
|
||||
@ -11378,12 +11378,10 @@ fnv1a@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/fnv1a/-/fnv1a-1.0.1.tgz#915e2d6d023c43d5224ad9f6d2a3c4156f5712f5"
|
||||
integrity sha1-kV4tbQI8Q9UiStn20qPEFW9XEvU=
|
||||
|
||||
follow-redirects@1.5.10:
|
||||
version "1.5.10"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
|
||||
integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
|
||||
dependencies:
|
||||
debug "=3.1.0"
|
||||
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==
|
||||
|
||||
for-each@^0.3.3, for-each@~0.3.3:
|
||||
version "0.3.3"
|
||||
|
Loading…
Reference in New Issue
Block a user