mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fixing confirmation layout when dapp has suggested a price (EIP-1559) (#11634)
This commit is contained in:
parent
984b78730f
commit
52bac60a22
@ -3,6 +3,7 @@
|
||||
|
||||
&__row {
|
||||
display: flex;
|
||||
grid-gap: 5px;
|
||||
}
|
||||
|
||||
&__title {
|
||||
@ -15,10 +16,6 @@
|
||||
margin-inline-start: 4px;
|
||||
}
|
||||
|
||||
&__detail-text {
|
||||
margin-inline-end: 20px !important;
|
||||
}
|
||||
|
||||
&__total {
|
||||
font-weight: bold;
|
||||
color: $ui-black;
|
||||
|
@ -301,6 +301,14 @@ export default class ConfirmTransactionBase extends Component {
|
||||
} = this.props;
|
||||
const { t } = this.context;
|
||||
|
||||
const getRequestingOrigin = () => {
|
||||
try {
|
||||
return new URL(txData.origin)?.hostname;
|
||||
} catch (err) {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
const notMainnetOrTest = !(isMainnet || process.env.IN_TEST);
|
||||
const gasPriceFetchFailure = isEthGasPrice || noGasPrice;
|
||||
|
||||
@ -371,7 +379,9 @@ export default class ConfirmTransactionBase extends Component {
|
||||
detailTitle={
|
||||
txData.dappSuggestedGasFees ? (
|
||||
<>
|
||||
{t('transactionDetailDappGasHeading', [txData.origin])}
|
||||
{t('transactionDetailDappGasHeading', [
|
||||
getRequestingOrigin(),
|
||||
])}
|
||||
<InfoTooltip
|
||||
contentText={t('transactionDetailDappGasTooltip')}
|
||||
position="top"
|
||||
|
Loading…
Reference in New Issue
Block a user