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:
parent
db77d05e5d
commit
78838f6e59
@ -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` }}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user