@ -9,6 +9,7 @@ import {
UNSENDABLE _ASSET _ERROR _KEY ,
UNSENDABLE _ASSET _ERROR _KEY ,
INSUFFICIENT _FUNDS _FOR _GAS _ERROR _KEY ,
INSUFFICIENT _FUNDS _FOR _GAS _ERROR _KEY ,
} from '../../../helpers/constants/error-keys' ;
} from '../../../helpers/constants/error-keys' ;
import { ASSET _TYPES } from '../../../ducks/send' ;
import SendAmountRow from './send-amount-row' ;
import SendAmountRow from './send-amount-row' ;
import SendHexDataRow from './send-hex-data-row' ;
import SendHexDataRow from './send-hex-data-row' ;
import SendAssetRow from './send-asset-row' ;
import SendAssetRow from './send-asset-row' ;
@ -32,6 +33,7 @@ export default class SendContent extends Component {
noGasPrice : PropTypes . bool ,
noGasPrice : PropTypes . bool ,
networkOrAccountNotSupports1559 : PropTypes . bool ,
networkOrAccountNotSupports1559 : PropTypes . bool ,
getIsBalanceInsufficient : PropTypes . bool ,
getIsBalanceInsufficient : PropTypes . bool ,
asset : PropTypes . object ,
} ;
} ;
render ( ) {
render ( ) {
@ -44,6 +46,7 @@ export default class SendContent extends Component {
isAssetSendable ,
isAssetSendable ,
networkOrAccountNotSupports1559 ,
networkOrAccountNotSupports1559 ,
getIsBalanceInsufficient ,
getIsBalanceInsufficient ,
asset ,
} = this . props ;
} = this . props ;
let gasError ;
let gasError ;
@ -51,6 +54,8 @@ export default class SendContent extends Component {
else if ( noGasPrice ) gasError = GAS _PRICE _FETCH _FAILURE _ERROR _KEY ;
else if ( noGasPrice ) gasError = GAS _PRICE _FETCH _FAILURE _ERROR _KEY ;
else if ( getIsBalanceInsufficient )
else if ( getIsBalanceInsufficient )
gasError = INSUFFICIENT _FUNDS _FOR _GAS _ERROR _KEY ;
gasError = INSUFFICIENT _FUNDS _FOR _GAS _ERROR _KEY ;
const showHexData =
this . props . showHexData && asset . type !== ASSET _TYPES . TOKEN ;
return (
return (
< PageContainerContent >
< PageContainerContent >
@ -68,7 +73,7 @@ export default class SendContent extends Component {
< SendAssetRow / >
< SendAssetRow / >
< SendAmountRow / >
< SendAmountRow / >
{ networkOrAccountNotSupports1559 ? < SendGasRow / > : null }
{ networkOrAccountNotSupports1559 ? < SendGasRow / > : null }
{ this . props . showHexData ? < SendHexDataRow / > : null }
{ showHexData ? < SendHexDataRow / > : null }
< / d i v >
< / d i v >
< / P a g e C o n t a i n e r C o n t e n t >
< / P a g e C o n t a i n e r C o n t e n t >
) ;
) ;