@ -22,6 +22,8 @@ export default class ExperimentalTab extends PureComponent {
setEIP1559V2Enabled : PropTypes . func ,
improvedTokenAllowanceEnabled : PropTypes . bool ,
setImprovedTokenAllowanceEnabled : PropTypes . func ,
transactionSecurityCheckEnabled : PropTypes . bool ,
setTransactionSecurityCheckEnabled : PropTypes . func ,
} ;
settingsRefs = Array (
@ -198,7 +200,7 @@ export default class ExperimentalTab extends PureComponent {
this . props ;
return (
< div ref = { this . settingsRefs [ 1 ] } className = "settings-page__content-row" >
< div ref = { this . settingsRefs [ 2 ] } className = "settings-page__content-row" >
< div className = "settings-page__content-item" >
< span > { t ( 'improvedTokenAllowance' ) } < / s p a n >
< div className = "settings-page__content-description" >
@ -229,9 +231,50 @@ export default class ExperimentalTab extends PureComponent {
) ;
}
renderTransactionSecurityCheckToggle ( ) {
const { t } = this . context ;
const {
transactionSecurityCheckEnabled ,
setTransactionSecurityCheckEnabled ,
} = this . props ;
return (
< div ref = { this . settingsRefs [ 1 ] } className = "settings-page__content-row" >
< div className = "settings-page__content-item" >
< span > { t ( 'transactionSecurityCheck' ) } < / s p a n >
< div className = "settings-page__content-description" >
{ t ( 'transactionSecurityCheckDescription' ) }
< / d i v >
< / d i v >
< div className = "settings-page__content-item" >
< div className = "settings-page__content-item-col" >
< ToggleButton
value = { transactionSecurityCheckEnabled }
onToggle = { ( value ) => {
this . context . trackEvent ( {
category : EVENT . CATEGORIES . SETTINGS ,
event : 'Enabled/Disable TransactionSecurityCheck' ,
properties : {
action : 'Enabled/Disable TransactionSecurityCheck' ,
legacy _event : true ,
} ,
} ) ;
setTransactionSecurityCheckEnabled ( ! value ) ;
} }
offLabel = { t ( 'off' ) }
onLabel = { t ( 'on' ) }
/ >
< / d i v >
< / d i v >
< / d i v >
) ;
}
render ( ) {
return (
< div className = "settings-page__body" >
{ this . renderTransactionSecurityCheckToggle ( ) }
{ this . renderImprovedTokenAllowanceToggle ( ) }
{ this . renderOpenSeaEnabledToggle ( ) }
{ this . renderCollectibleDetectionToggle ( ) }