- )}
+ {/* Only allow to toggle tracking on non custom tokens
+ because the user can just remove the custom token instead */}
+ {!this.props.custom &&
+ this.props.toggleTracked && (
+
Welcome to the New MyCrypto Beta Release Candidate!
-
- You are about to use the new MyCrypto Beta Release Candidate. Although this is a release
- candidate for production, we encourage caution while using this unreleased version of
- MyCrypto.
-
-
We hope to move this version of MyCrypto into production in the near future!
-
- Feedback and bug reports are greatly appreciated. You can file issues on our{' '}
-
- GitHub repository
- {' '}
- or join our Discord server to discuss the
- beta.
-
{
);
}
- public componentWillReceiveProps(nextProps: Props) {
+ public UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (nextProps.transactionBroadcasted && this.state.showModal) {
this.closeModal();
}
diff --git a/common/components/SubTabs/index.tsx b/common/components/SubTabs/index.tsx
index 40ccb23b..c9819a0a 100644
--- a/common/components/SubTabs/index.tsx
+++ b/common/components/SubTabs/index.tsx
@@ -39,7 +39,7 @@ export default class SubTabs extends React.PureComponent {
window.removeEventListener('resize', this.handleResize);
}
- public componentWillReceiveProps(nextProps: Props) {
+ public UNSAFE_componentWillReceiveProps(nextProps: Props) {
// When new tabs come in, we'll need to uncollapse so that they can
// be measured and collapsed again, if needed.
if (this.props.tabs !== nextProps.tabs) {
diff --git a/common/components/TXMetaDataPanel/TXMetaDataPanel.tsx b/common/components/TXMetaDataPanel/TXMetaDataPanel.tsx
index 993fc0d9..da1bfff3 100644
--- a/common/components/TXMetaDataPanel/TXMetaDataPanel.tsx
+++ b/common/components/TXMetaDataPanel/TXMetaDataPanel.tsx
@@ -76,7 +76,7 @@ class TXMetaDataPanel extends React.Component {
}
}
- public componentWillReceiveProps(nextProps: Props) {
+ public UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (
(this.props.offline && !nextProps.offline) ||
this.props.network.unit !== nextProps.network.unit
diff --git a/common/components/TXMetaDataPanel/components/AdvancedGas.tsx b/common/components/TXMetaDataPanel/components/AdvancedGas.tsx
index d786b9ba..7ca48c60 100644
--- a/common/components/TXMetaDataPanel/components/AdvancedGas.tsx
+++ b/common/components/TXMetaDataPanel/components/AdvancedGas.tsx
@@ -9,7 +9,6 @@ import { NonceField, GasLimitField, DataField } from 'components';
import { connect } from 'react-redux';
import { getAutoGasLimitEnabled } from 'selectors/config';
import { isValidGasPrice } from 'selectors/transaction';
-import { sanitizeNumericalInput } from 'libs/values';
import { Input } from 'components/ui';
import { EAC_SCHEDULING_CONFIG } from 'libs/scheduling';
import { getScheduleGasPrice, getTimeBounty } from 'selectors/schedule';
@@ -83,9 +82,11 @@ class AdvancedGas extends React.Component {
{translateRaw('OFFLINE_STEP2_LABEL_3')} (gwei)
+ {/*We leave type as string instead of number, because things such as multiple decimals
+ or invalid exponent notation does not fire the onchange handler
+ so the component will not display as invalid for such things */}
{
private handleGasPriceChange = (ev: React.FormEvent) => {
const { value } = ev.currentTarget;
- this.props.inputGasPrice(sanitizeNumericalInput(value));
+ this.props.inputGasPrice(value);
};
private handleToggleAutoGasLimit = (_: React.FormEvent) => {
diff --git a/common/components/TXMetaDataPanel/components/FeeSummary.tsx b/common/components/TXMetaDataPanel/components/FeeSummary.tsx
index fe6ac65a..5165af52 100644
--- a/common/components/TXMetaDataPanel/components/FeeSummary.tsx
+++ b/common/components/TXMetaDataPanel/components/FeeSummary.tsx
@@ -54,6 +54,9 @@ class FeeSummary extends React.Component {
scheduleGasLimit
} = this.props;
+ if (!gasPrice.value || gasPrice.value.eqn(0) || !gasLimit.value || gasLimit.value.eqn(0)) {
+ return null;
+ }
if (isGasEstimating) {
return (
diff --git a/common/components/TXMetaDataPanel/components/SimpleGas.tsx b/common/components/TXMetaDataPanel/components/SimpleGas.tsx
index e386af59..84d065d0 100644
--- a/common/components/TXMetaDataPanel/components/SimpleGas.tsx
+++ b/common/components/TXMetaDataPanel/components/SimpleGas.tsx
@@ -57,7 +57,7 @@ class SimpleGas extends React.Component {
this.props.fetchGasEstimates();
}
- public componentWillReceiveProps(nextProps: Props) {
+ public UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (!this.state.hasSetRecommendedGasPrice && nextProps.gasEstimates) {
this.setState({ hasSetRecommendedGasPrice: true });
this.props.setGasPrice(nextProps.gasEstimates.fast.toString());
diff --git a/common/components/TogglablePassword.tsx b/common/components/TogglablePassword.tsx
index d5871577..4c2aa657 100644
--- a/common/components/TogglablePassword.tsx
+++ b/common/components/TogglablePassword.tsx
@@ -40,7 +40,7 @@ export default class TogglablePassword extends React.PureComponent
isVisible: !!this.props.isVisible
};
- public componentWillReceiveProps(nextProps: Props) {
+ public UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (this.props.isVisible !== nextProps.isVisible) {
this.setState({ isVisible: !!nextProps.isVisible });
}
@@ -69,7 +69,8 @@ export default class TogglablePassword extends React.PureComponent
{isTextareaWhenVisible && isVisible ? (
{
{translateRaw('SCHEDULE_GAS_PRICE')} (gwei)
= ({ isReadOnly }) => (
= ({ isReadOnly }) => (
= ({ isReadOnly }) => (
{translate('SCHEDULE_BLOCK')}
{
this.props.resetTransactionRequested();
}
- public componentWillReceiveProps(nextProps: Props) {
+ public UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (nextProps.wallet && this.props.wallet !== nextProps.wallet) {
this.setWalletAsyncState(nextProps.wallet);
}
diff --git a/common/containers/Tabs/SendTransaction/components/WalletInfo.tsx b/common/containers/Tabs/SendTransaction/components/WalletInfo.tsx
index b3c12804..00e79251 100644
--- a/common/containers/Tabs/SendTransaction/components/WalletInfo.tsx
+++ b/common/containers/Tabs/SendTransaction/components/WalletInfo.tsx
@@ -30,7 +30,7 @@ export default class WalletInfo extends React.PureComponent {
this.setStateFromWallet(this.props.wallet);
}
- public componentWillReceiveProps(nextProps: Props) {
+ public UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (this.props.wallet !== nextProps.wallet) {
this.setStateFromWallet(nextProps.wallet);
}
diff --git a/common/containers/Tabs/SignAndVerifyMessage/components/SignMessage/index.tsx b/common/containers/Tabs/SignAndVerifyMessage/components/SignMessage/index.tsx
index fac28f67..17166b70 100644
--- a/common/containers/Tabs/SignAndVerifyMessage/components/SignMessage/index.tsx
+++ b/common/containers/Tabs/SignAndVerifyMessage/components/SignMessage/index.tsx
@@ -57,7 +57,8 @@ export class SignMessage extends Component {
- MyCrypto requires certain features that your browser doesn't offer. Your browser may also be missing security updates
- that could open you up to vulnerabilities. Please update your browser, or switch to one of the following browsers
- to continue using MyCrypto.
+ MyCrypto requires certain features that your browser doesn't offer. Your browser may also be missing security updates that
+ could open you up to vulnerabilities. Please update your browser, or switch to one of the following browsers to continue
+ using MyCrypto.
- MyCrypto requires certain features that your browser doesn't offer. Please use your device's default browser, or switch
- to a laptop or desktop computer to continue using MyCrypto.
+ MyCrypto requires certain features that your browser doesn't offer. Please use your device's default browser, or switch to
+ a laptop or desktop computer to continue using MyCrypto.