1
0
mirror of https://github.com/dap-ps/discover.git synced 2025-03-02 18:00:28 +00:00

add widtdrawMax as the default for the field

This commit is contained in:
Jonathan Rainville 2019-07-30 14:08:27 -04:00
parent db77d05e5d
commit 78838f6e59

View File

@ -40,7 +40,14 @@ class Withdraw extends React.Component {
} }
render() { render() {
const { dappState, dapp, visible, onClickClose, sntValue } = this.props const {
dappState,
dapp,
visible,
onClickClose,
sntValue,
withdrawMax,
} = this.props
if (dapp === null) if (dapp === null)
return <Modal visible={false} onClickClose={onClickClose} /> return <Modal visible={false} onClickClose={onClickClose} />
@ -115,7 +122,7 @@ class Withdraw extends React.Component {
<div className={`${styles.inputArea} ${styles.inputAreaBorder}`}> <div className={`${styles.inputArea} ${styles.inputAreaBorder}`}>
<input <input
type="text" type="text"
value={sntValue} value={!sntValue && sntValue !== 0 ? withdrawMax : sntValue}
onChange={this.handleSNTChange} onChange={this.handleSNTChange}
style={{ width: `${21 * Math.max(1, sntValue.length)}px` }} style={{ width: `${21 * Math.max(1, sntValue.length)}px` }}
/> />