Add amount helper text

This commit is contained in:
Reckless_Satoshi 2022-01-10 02:27:34 -08:00
parent 33df480301
commit 22d3799680
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -27,7 +27,6 @@ function pn(x) {
export default class MakerPage extends Component { export default class MakerPage extends Component {
defaultCurrency = 1; defaultCurrency = 1;
defaultCurrencyCode = 'USD'; defaultCurrencyCode = 'USD';
defaultAmount = 0 ;
defaultPaymentMethod = "not specified"; defaultPaymentMethod = "not specified";
defaultPremium = 0; defaultPremium = 0;
minTradeSats = 10000; minTradeSats = 10000;
@ -40,7 +39,6 @@ export default class MakerPage extends Component {
type: 0, type: 0,
currency: this.defaultCurrency, currency: this.defaultCurrency,
currencyCode: this.defaultCurrencyCode, currencyCode: this.defaultCurrencyCode,
amount: this.defaultAmount,
payment_method: this.defaultPaymentMethod, payment_method: this.defaultPaymentMethod,
premium: 0, premium: 0,
satoshis: null, satoshis: null,
@ -169,10 +167,11 @@ export default class MakerPage extends Component {
</Grid> </Grid>
<Grid container xs={11} align="center"> <Grid container xs={11} align="center">
<TextField <TextField
error={this.state.amount == 0}
helperText={this.state.amount == 0 ? 'Must be more than 0' : null}
label="Amount" label="Amount"
type="number" type="number"
required="true" required="true"
defaultValue={this.defaultAmount}
inputProps={{ inputProps={{
min:0 , min:0 ,
style: {textAlign:"center"} style: {textAlign:"center"}