fix all step properties, removing publish or send minimums app-side
This commit is contained in:
parent
d39664a0fd
commit
ca6ef4e11f
6 changed files with 6 additions and 10 deletions
|
@ -34,7 +34,7 @@ class FormFieldPrice extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { defaultValue, placeholder, min, step } = this.props;
|
const { defaultValue, placeholder, min } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className="form-field">
|
<span className="form-field">
|
||||||
|
@ -43,7 +43,7 @@ class FormFieldPrice extends React.PureComponent {
|
||||||
name="amount"
|
name="amount"
|
||||||
min={min}
|
min={min}
|
||||||
placeholder={placeholder || null}
|
placeholder={placeholder || null}
|
||||||
step={step}
|
step="any" //Unfortunately, you cannot set a step without triggering validation that enforces a multiple of the step
|
||||||
onChange={event => this.handleFeeAmountChange(event)}
|
onChange={event => this.handleFeeAmountChange(event)}
|
||||||
defaultValue={
|
defaultValue={
|
||||||
defaultValue && defaultValue.amount ? defaultValue.amount : ""
|
defaultValue && defaultValue.amount ? defaultValue.amount : ""
|
||||||
|
|
|
@ -148,7 +148,7 @@ class ChannelSection extends React.PureComponent {
|
||||||
<FormRow
|
<FormRow
|
||||||
label={__("Deposit")}
|
label={__("Deposit")}
|
||||||
postfix="LBC"
|
postfix="LBC"
|
||||||
step="0.1"
|
step="any"
|
||||||
min="0"
|
min="0"
|
||||||
type="number"
|
type="number"
|
||||||
helper={lbcInputHelp}
|
helper={lbcInputHelp}
|
||||||
|
|
|
@ -663,10 +663,8 @@ class PublishForm extends React.PureComponent {
|
||||||
checked={this.state.isFee}
|
checked={this.state.isFee}
|
||||||
/>
|
/>
|
||||||
<span className={!this.state.isFee ? "hidden" : ""}>
|
<span className={!this.state.isFee ? "hidden" : ""}>
|
||||||
{/*min=0.01 caused weird interactions with step (e.g. down from 5 equals 4.91 rather than 4.9) */}
|
|
||||||
<FormFieldPrice
|
<FormFieldPrice
|
||||||
min="0"
|
min="0"
|
||||||
step="0.1"
|
|
||||||
defaultValue={{ amount: 5.0, currency: "LBC" }}
|
defaultValue={{ amount: 5.0, currency: "LBC" }}
|
||||||
onChange={val => this.handleFeeChange(val)}
|
onChange={val => this.handleFeeChange(val)}
|
||||||
/>
|
/>
|
||||||
|
@ -823,7 +821,7 @@ class PublishForm extends React.PureComponent {
|
||||||
<FormRow
|
<FormRow
|
||||||
ref="bid"
|
ref="bid"
|
||||||
type="number"
|
type="number"
|
||||||
step="0.1"
|
step="any"
|
||||||
label={__("Deposit")}
|
label={__("Deposit")}
|
||||||
postfix="LBC"
|
postfix="LBC"
|
||||||
onChange={event => {
|
onChange={event => {
|
||||||
|
|
|
@ -33,7 +33,7 @@ class WalletSend extends React.PureComponent {
|
||||||
<FormRow
|
<FormRow
|
||||||
label={__("Amount")}
|
label={__("Amount")}
|
||||||
postfix={__("LBC")}
|
postfix={__("LBC")}
|
||||||
step="0.1"
|
step="any"
|
||||||
min="0"
|
min="0"
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="1.23"
|
placeholder="1.23"
|
||||||
|
|
|
@ -37,7 +37,7 @@ class WalletSendTip extends React.PureComponent {
|
||||||
label={__("Amount")}
|
label={__("Amount")}
|
||||||
postfix={__("LBC")}
|
postfix={__("LBC")}
|
||||||
min="0"
|
min="0"
|
||||||
step="0.1"
|
step="any"
|
||||||
type="number"
|
type="number"
|
||||||
errorMessage={errorMessage}
|
errorMessage={errorMessage}
|
||||||
helper={
|
helper={
|
||||||
|
|
|
@ -218,7 +218,6 @@ class SettingsPage extends React.PureComponent {
|
||||||
{!daemonSettings.disable_max_key_fee &&
|
{!daemonSettings.disable_max_key_fee &&
|
||||||
<FormFieldPrice
|
<FormFieldPrice
|
||||||
min="0"
|
min="0"
|
||||||
step="1"
|
|
||||||
onChange={this.onKeyFeeChange.bind(this)}
|
onChange={this.onKeyFeeChange.bind(this)}
|
||||||
defaultValue={
|
defaultValue={
|
||||||
daemonSettings.max_key_fee
|
daemonSettings.max_key_fee
|
||||||
|
@ -264,7 +263,6 @@ class SettingsPage extends React.PureComponent {
|
||||||
{instantPurchaseEnabled &&
|
{instantPurchaseEnabled &&
|
||||||
<FormFieldPrice
|
<FormFieldPrice
|
||||||
min="0.1"
|
min="0.1"
|
||||||
step="0.1"
|
|
||||||
onChange={val => this.onInstantPurchaseMaxChange(val)}
|
onChange={val => this.onInstantPurchaseMaxChange(val)}
|
||||||
defaultValue={instantPurchaseMax}
|
defaultValue={instantPurchaseMax}
|
||||||
/>}
|
/>}
|
||||||
|
|
Loading…
Add table
Reference in a new issue