Remove 'buy' as make order default

This commit is contained in:
Reckless_Satoshi 2022-05-10 05:18:28 -07:00
parent 1b4d42cfdf
commit 8ae7a5d0c9
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 19 additions and 9 deletions

View File

@ -42,7 +42,7 @@ class MakerPage extends Component {
maxTradeSats: this.defaultMaxTradeSats,
maxBondlessSats: this.defaultMaxBondlessSats,
is_explicit: false,
type: 0,
type: null,
currency: this.defaultCurrency,
currencyCode: this.defaultCurrencyCode,
payment_method: this.defaultPaymentMethod,
@ -275,7 +275,7 @@ class MakerPage extends Component {
{t("Buy or Sell Bitcoin?")}
</FormHelperText>
<RadioGroup row defaultValue="0" onChange={this.handleTypeChange}>
<RadioGroup row value={this.state.type} onChange={this.handleTypeChange}>
<FormControlLabel
value="0"
control={<Radio icon={<BuySatsIcon sx={{width:"30px",height:"30px"}} color="text.secondary"/>} checkedIcon={<BuySatsCheckedIcon sx={{width:"30px",height:"30px"}} color="primary"/>}/>}
@ -816,7 +816,8 @@ class MakerPage extends Component {
<Grid item xs={12} align="center">
{/* conditions to disable the make button */}
{(this.state.amount == null & (this.state.enableAmountRange == false || this.state.loadingLimits) ||
{(this.state.type == null ||
this.state.amount == null & (this.state.enableAmountRange == false || this.state.loadingLimits) ||
this.state.enableAmountRange & (this.minAmountError() || this.maxAmountError()) ||
this.state.amount <= 0 & !this.state.enableAmountRange ||
(this.state.is_explicit & (this.state.badSatoshis != null || this.state.satoshis == null)) ||
@ -843,10 +844,14 @@ class MakerPage extends Component {
: ""}
<Typography component="subtitle2" variant="subtitle2">
<div align='center'>
{this.state.type==0 ?
t("Create a BTC buy order for ")
{this.state.type==null ?
t("Create an order for ")
:
t("Create a BTC sell order for ")
(this.state.type==0 ?
t("Create a BTC buy order for ")
:
t("Create a BTC sell order for ")
)
}
{this.state.enableAmountRange & this.state.minAmount != null?
this.state.minAmount+"-"+this.state.maxAmount

View File

@ -60,6 +60,7 @@
"You must fill the order correctly":"You must fill the order correctly",
"Create Order":"Create Order",
"Back":"Back",
"Create an order for ":"Create an order for ",
"Create a BTC buy order for ":"Create a BTC buy order for ",
"Create a BTC sell order for ":"Create a BTC sell order for ",
" of {{satoshis}} Satoshis":" of {{satoshis}} Satoshis",
@ -170,6 +171,9 @@
"Taker fee":"Taker fee",
"Number of public BUY orders":"Number of public BUY orders",
"Number of public SELL orders":"Number of public SELL orders",
"Your last order #{{orderID}}":"Your last order #{{orderID}}",
"Inactive order":"Inactive order",
"You do not have previous orders":"You do not have previous orders",
"ORDER PAGE - OrderPage.js": "Order details page",

View File

@ -60,8 +60,9 @@
"You must fill the order correctly": "Debes rellenar la orden correctamente",
"Create Order":"Crear orden",
"Back":"Volver",
"Create a BTC buy order for ": "Crear orden de compra de bitcoin por ",
"Create a BTC sell order for ": "Crear orden de venta de bitcoin por ",
"Create an order for ":"Crear una orden por ",
"Create a BTC buy order for ": "Crear orden de compra de BTC por ",
"Create a BTC sell order for ": "Crear orden de venta de BTC por ",
" of {{satoshis}} Satoshis": " de {{satoshis}} Sats",
" at market price":" a precio de mercado",
" at a {{premium}}% premium":" con una prima del {{premium}}%",