2021-02-04 19:15:23 +01:00
|
|
|
export const ETH = 'ETH';
|
|
|
|
export const GWEI = 'GWEI';
|
|
|
|
export const WEI = 'WEI';
|
2018-10-17 01:03:29 +02:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export const PRIMARY = 'PRIMARY';
|
|
|
|
export const SECONDARY = 'SECONDARY';
|
2019-02-26 19:30:41 +01:00
|
|
|
|
Use `AdvancedGasInputs` in `AdvancedTabContent` (#7186)
* Use `AdvancedGasInputs` in `AdvancedTabContent`
The `AdvancedGasInputs` component was originally extracted from the
`AdvancedTabContent` component, duplicating much of the rendering
logic. They have since evolved separately, with bugs being fixed in one
place but not the other.
The inputs and outputs expected weren't exactly the same, as the
`AdvancedGasInputs` component converts the input custom gas price and
limit, and it converts them both in the setter methods as well.
The `GasModalPageContainer` had to be adjusted to avoid converting
these values multiple times.
Both components dealt with input debouncing separately, both in less
than ideal ways. `AdvancedTabContent` didn't debounce either field, but
it did debounce the check for whether the gas limit field was below the
minimum value. So if a less-than-minimum value was set, it would be
propogated upwards and could be saved if the user clicked 'Save'
quickly enough. After a second delay it would snap back to the minimum
value. The `AdvancedGasInputs` component debounced both fields, but
it would replace any gas limit below the minimum with the minimum
value. This led to a problem where a brief pause during typing would
reset the field to 21000.
The `AdvancedGasInputs` approach was chosen, except that it was
updated to no longer change the gas limit if it was below the minimum.
Instead it displays an error. Parent components were checked to ensure
they would detect the error case of the gas limit being set too low,
and prevent the form submission in those cases. Of the three parents,
one had already dealt with it correctly, one needed to convert the
gas limit from hex first, and another needed the gas limit check added.
Closes #6872
* Cleanup send components
Empty README files have been removed, and a mistake in the index file
for the send page has been corrected. The Gas Slider component class
name was updated as well; it looks like it was originally created from
`AdvancedTabContent`, so it still had that class name.
2019-10-23 14:23:15 +02:00
|
|
|
export const GAS_ESTIMATE_TYPES = {
|
|
|
|
SLOW: 'SLOW',
|
|
|
|
AVERAGE: 'AVERAGE',
|
|
|
|
FAST: 'FAST',
|
2020-10-12 18:51:17 +02:00
|
|
|
FASTEST: 'FASTEST',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2022-01-06 01:55:20 +01:00
|
|
|
|
2022-08-04 19:45:25 +02:00
|
|
|
let _supportRequestLink = 'https://metamask.zendesk.com/hc/en-us';
|
2022-07-14 00:15:38 +02:00
|
|
|
const _contractAddressLink =
|
|
|
|
'https://metamask.zendesk.com/hc/en-us/articles/360020028092-What-is-the-known-contract-address-warning-';
|
2022-01-06 01:55:20 +01:00
|
|
|
|
|
|
|
///: BEGIN:ONLY_INCLUDE_IN(flask)
|
|
|
|
_supportRequestLink =
|
|
|
|
'https://metamask-flask.zendesk.com/hc/en-us/requests/new';
|
|
|
|
///: END:ONLY_INCLUDE_IN
|
|
|
|
|
|
|
|
export const SUPPORT_REQUEST_LINK = _supportRequestLink;
|
2022-07-14 00:15:38 +02:00
|
|
|
export const CONTRACT_ADDRESS_LINK = _contractAddressLink;
|
2022-12-15 21:56:27 +01:00
|
|
|
export const PASSWORD_MIN_LENGTH = 8;
|