@ -36,6 +36,7 @@ import InfoTooltip from '../../components/ui/info-tooltip/info-tooltip';
import LoadingHeartBeat from '../../components/ui/loading-heartbeat' ;
import GasTiming from '../../components/app/gas-timing/gas-timing.component' ;
import LedgerInstructionField from '../../components/app/ledger-instruction-field' ;
import MultiLayerFeeMessage from '../../components/app/multilayer-fee-message' ;
import {
COLORS ,
@ -134,6 +135,7 @@ export default class ConfirmTransactionBase extends Component {
nativeCurrency : PropTypes . string ,
supportsEIP1559 : PropTypes . bool ,
hardwareWalletRequiresConnection : PropTypes . bool ,
isMultiLayerFeeNetwork : PropTypes . bool ,
} ;
state = {
@ -315,6 +317,7 @@ export default class ConfirmTransactionBase extends Component {
isMainnet ,
showLedgerSteps ,
supportsEIP1559 ,
isMultiLayerFeeNetwork ,
} = this . props ;
const { t } = this . context ;
@ -433,7 +436,9 @@ export default class ConfirmTransactionBase extends Component {
detailTitle = {
txData . dappSuggestedGasFees ? (
< >
{ t ( 'transactionDetailGasHeading' ) }
{ isMultiLayerFeeNetwork
? t ( 'transactionDetailLayer2GasHeading' )
: t ( 'transactionDetailGasHeading' ) }
< InfoTooltip
contentText = { t ( 'transactionDetailDappGasTooltip' ) }
position = "top"
@ -443,7 +448,9 @@ export default class ConfirmTransactionBase extends Component {
< / >
) : (
< >
{ t ( 'transactionDetailGasHeading' ) }
{ isMultiLayerFeeNetwork
? t ( 'transactionDetailLayer2GasHeading' )
: t ( 'transactionDetailGasHeading' ) }
< InfoTooltip
contentText = {
< >
@ -473,14 +480,16 @@ export default class ConfirmTransactionBase extends Component {
}
detailTitleColor = { COLORS . BLACK }
detailText = {
< div className = "confirm-page-container-content__currency-container" >
{ renderHeartBeatIfNotInTest ( ) }
< UserPreferencedCurrencyDisplay
type = { SECONDARY }
value = { hexMinimumTransactionFee }
hideLabel = { Boolean ( useNativeCurrencyAsPrimaryCurrency ) }
/ >
< / d i v >
! isMultiLayerFeeNetwork && (
< div className = "confirm-page-container-content__currency-container" >
{ renderHeartBeatIfNotInTest ( ) }
< UserPreferencedCurrencyDisplay
type = { SECONDARY }
value = { hexMinimumTransactionFee }
hideLabel = { Boolean ( useNativeCurrencyAsPrimaryCurrency ) }
/ >
< / d i v >
)
}
detailTotal = {
< div className = "confirm-page-container-content__currency-container" >
@ -489,26 +498,30 @@ export default class ConfirmTransactionBase extends Component {
type = { PRIMARY }
value = { hexMinimumTransactionFee }
hideLabel = { ! useNativeCurrencyAsPrimaryCurrency }
numberOfDecimals = { isMultiLayerFeeNetwork ? 18 : 6 }
/ >
< / d i v >
}
subText = { t ( 'editGasSubTextFee' , [
< b key = "editGasSubTextFeeLabel" >
{ t ( 'editGasSubTextFeeLabel' ) }
< / b > ,
< div
key = "editGasSubTextFeeValue"
className = "confirm-page-container-content__currency-container"
>
{ renderHeartBeatIfNotInTest ( ) }
< UserPreferencedCurrencyDisplay
key = "editGasSubTextFeeAmount"
type = { PRIMARY }
value = { hexMaximumTransactionFee }
hideLabel = { ! useNativeCurrencyAsPrimaryCurrency }
/ >
< / d i v > ,
] ) }
subText = {
! isMultiLayerFeeNetwork &&
t ( 'editGasSubTextFee' , [
< b key = "editGasSubTextFeeLabel" >
{ t ( 'editGasSubTextFeeLabel' ) }
< / b > ,
< div
key = "editGasSubTextFeeValue"
className = "confirm-page-container-content__currency-container"
>
{ renderHeartBeatIfNotInTest ( ) }
< UserPreferencedCurrencyDisplay
key = "editGasSubTextFeeAmount"
type = { PRIMARY }
value = { hexMaximumTransactionFee }
hideLabel = { ! useNativeCurrencyAsPrimaryCurrency }
/ >
< / d i v > ,
] )
}
subTitle = {
< >
{ txData . dappSuggestedGasFees ? (
@ -537,19 +550,27 @@ export default class ConfirmTransactionBase extends Component {
}
/ >
) ,
< TransactionDetailItem
key = "total-item"
detailTitle = { t ( 'total' ) }
detailText = { renderTotalDetailText ( ) }
detailTotal = { renderTotalDetailTotal ( ) }
subTitle = { t ( 'transactionDetailGasTotalSubtitle' ) }
subText = { t ( 'editGasSubTextAmount' , [
< b key = "editGasSubTextAmountLabel" >
{ t ( 'editGasSubTextAmountLabel' ) }
< / b > ,
renderTotalMaxAmount ( ) ,
] ) }
/ > ,
isMultiLayerFeeNetwork && (
< MultiLayerFeeMessage
transaction = { txData }
layer2fee = { hexMinimumTransactionFee }
/ >
) ,
! isMultiLayerFeeNetwork && (
< TransactionDetailItem
key = "total-item"
detailTitle = { t ( 'total' ) }
detailText = { renderTotalDetailText ( ) }
detailTotal = { renderTotalDetailTotal ( ) }
subTitle = { t ( 'transactionDetailGasTotalSubtitle' ) }
subText = { t ( 'editGasSubTextAmount' , [
< b key = "editGasSubTextAmountLabel" >
{ t ( 'editGasSubTextAmountLabel' ) }
< / b > ,
renderTotalMaxAmount ( ) ,
] ) }
/ >
) ,
] }
/ >
{ nonceField }