diff --git a/packages/p2p/src/components/buy-sell/buy-sell-form.jsx b/packages/p2p/src/components/buy-sell/buy-sell-form.jsx index bdd3faef538d..ab9bc96f1193 100644 --- a/packages/p2p/src/components/buy-sell/buy-sell-form.jsx +++ b/packages/p2p/src/components/buy-sell/buy-sell-form.jsx @@ -129,7 +129,7 @@ const BuySellForm = props => { validate={buy_sell_store.validatePopup} validateOnMount={!should_disable_field} initialValues={{ - amount: min_order_amount_limit, + amount: input_amount, contact_info: buy_sell_store.contact_info, payment_info: buy_sell_store.payment_info, rate: rate_type === ad_type.FLOAT ? effective_rate : null, diff --git a/packages/p2p/src/stores/buy-sell-store.js b/packages/p2p/src/stores/buy-sell-store.js index 5b5166ccc0c1..f571152241eb 100644 --- a/packages/p2p/src/stores/buy-sell-store.js +++ b/packages/p2p/src/stores/buy-sell-store.js @@ -525,9 +525,9 @@ export default class BuySellStore extends BaseStore { const validations = { amount: [ v => !!v, - v => (this.root_store.buy_sell_store.is_buy_advert ? true : v <= this.root_store.general_store.balance), v => v >= this.advert.min_order_amount_limit, v => v <= this.advert.max_order_amount_limit, + v => (this.root_store.buy_sell_store.is_buy_advert ? true : v <= this.root_store.general_store.balance), v => countDecimalPlaces(v) <= getDecimalPlaces(this.account_currency), ], }; @@ -544,10 +544,6 @@ export default class BuySellStore extends BaseStore { const common_messages = [ localize('Enter a valid amount'), - localize('Maximum is {{value}} {{currency}}', { - currency: this.account_currency, - value: formatMoney(this.account_currency, this.root_store.general_store.balance, true), - }), localize('Minimum is {{value}} {{currency}}', { currency: this.account_currency, value: display_min_amount, @@ -556,6 +552,10 @@ export default class BuySellStore extends BaseStore { currency: this.account_currency, value: display_max_amount, }), + localize('Maximum is {{value}} {{currency}}', { + currency: this.account_currency, + value: formatMoney(this.account_currency, this.root_store.general_store.balance, true), + }), localize('Enter a valid amount'), ];