1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Changed networks tab to explicitly pass in false and fix implicit type casting

This commit is contained in:
Zachary Belford 2022-06-02 15:54:16 -07:00
parent b76943ea18
commit c2d5bd01c4
No known key found for this signature in database
GPG Key ID: CC6C9E5B7B8D6059
4 changed files with 11 additions and 7 deletions

View File

@ -217,8 +217,8 @@ export default function EditGasDisplay({
hasGasErrors === false && hasGasErrors === false &&
supportsEIP1559 && ( supportsEIP1559 && (
<GasTiming <GasTiming
maxFeePerGas={maxFeePerGas} maxFeePerGas={maxFeePerGas.toString()}
maxPriorityFeePerGas={maxPriorityFeePerGas} maxPriorityFeePerGas={maxPriorityFeePerGas.toString()}
gasWarnings={gasWarnings} gasWarnings={gasWarnings}
/> />
) )

View File

@ -90,8 +90,8 @@ const GasDetailsItem = ({ userAcknowledgedGasMissing = false }) => {
} }
subTitle={ subTitle={
<GasTiming <GasTiming
maxPriorityFeePerGas={maxPriorityFeePerGas} maxPriorityFeePerGas={maxPriorityFeePerGas.toString()}
maxFeePerGas={maxFeePerGas} maxFeePerGas={maxFeePerGas.toString()}
/> />
} }
/> />

View File

@ -417,7 +417,7 @@ export default class ConfirmTransactionBase extends Component {
<div className="custom-nonce-input"> <div className="custom-nonce-input">
<TextField <TextField
type="number" type="number"
min=0 min={0}
placeholder={ placeholder={
typeof nextNonce === 'number' ? nextNonce.toString() : null typeof nextNonce === 'number' ? nextNonce.toString() : null
} }
@ -546,10 +546,10 @@ export default class ConfirmTransactionBase extends Component {
maxPriorityFeePerGas={hexWEIToDecGWEI( maxPriorityFeePerGas={hexWEIToDecGWEI(
maxPriorityFeePerGas || maxPriorityFeePerGas ||
txData.txParams.maxPriorityFeePerGas, txData.txParams.maxPriorityFeePerGas,
)} ).toString()}
maxFeePerGas={hexWEIToDecGWEI( maxFeePerGas={hexWEIToDecGWEI(
maxFeePerGas || txData.txParams.maxFeePerGas, maxFeePerGas || txData.txParams.maxFeePerGas,
)} ).toString()}
/> />
)} )}
</> </>

View File

@ -342,6 +342,10 @@ class SettingsPage extends PureComponent {
path={ADD_NETWORK_ROUTE} path={ADD_NETWORK_ROUTE}
render={() => <NetworksTab addNewNetwork />} render={() => <NetworksTab addNewNetwork />}
/> />
<Route
path={NETWORKS_ROUTE}
render={() => <NetworksTab addNewNetwork={false} />}
/>
<Route path={NETWORKS_ROUTE} component={NetworksTab} /> <Route path={NETWORKS_ROUTE} component={NetworksTab} />
<Route exact path={SECURITY_ROUTE} component={SecurityTab} /> <Route exact path={SECURITY_ROUTE} component={SecurityTab} />
<Route exact path={EXPERIMENTAL_ROUTE} component={ExperimentalTab} /> <Route exact path={EXPERIMENTAL_ROUTE} component={ExperimentalTab} />