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 &&
supportsEIP1559 && (
<GasTiming
maxFeePerGas={maxFeePerGas}
maxPriorityFeePerGas={maxPriorityFeePerGas}
maxFeePerGas={maxFeePerGas.toString()}
maxPriorityFeePerGas={maxPriorityFeePerGas.toString()}
gasWarnings={gasWarnings}
/>
)

View File

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

View File

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

View File

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