1
0
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:
ryanml 2021-07-28 09:29:55 -07:00 committed by GitHub
parent 984b78730f
commit 52bac60a22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -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;

View File

@ -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"