1
0
mirror of https://github.com/dap-ps/discover.git synced 2025-03-01 17:30:36 +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

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