mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-18 08:43:14 +00:00
updated env-sample
This commit is contained in:
10
.env-sample
10
.env-sample
@ -10,8 +10,14 @@ BOND_SIZE = 0.01
|
|||||||
MIN_TRADE = 10000
|
MIN_TRADE = 10000
|
||||||
MAX_TRADE = 500000
|
MAX_TRADE = 500000
|
||||||
|
|
||||||
# Expiration time in minutes
|
# Expiration time for HODL invoices and returning collateral in HOURS
|
||||||
EXPIRATION_MAKE = 5
|
BOND_EXPIRY = 8
|
||||||
|
ESCROW_EXPIRY = 8
|
||||||
|
|
||||||
|
# Expiration time for locking collateral in MINUTES
|
||||||
|
EXP_MAKER_BOND_INVOICE = 300
|
||||||
|
EXP_TAKER_BOND_INVOICE = 200
|
||||||
|
EXP_TRADE_ESCR_INVOICE = 200
|
||||||
|
|
||||||
# Username for HTLCs escrows
|
# Username for HTLCs escrows
|
||||||
ESCROW_USERNAME = 'admin'
|
ESCROW_USERNAME = 'admin'
|
@ -126,10 +126,6 @@ class Logics():
|
|||||||
else:
|
else:
|
||||||
order.status = Order.Status.WFE
|
order.status = Order.Status.WFE
|
||||||
|
|
||||||
# If the order status was Payment Failed. Move forward to invoice Updated.
|
|
||||||
if order.status == Order.Status.FAI:
|
|
||||||
order.status = Order.Status.UPI
|
|
||||||
|
|
||||||
order.save()
|
order.save()
|
||||||
return True, None
|
return True, None
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class Order(models.Model):
|
|||||||
type = models.PositiveSmallIntegerField(choices=Types.choices, null=False)
|
type = models.PositiveSmallIntegerField(choices=Types.choices, null=False)
|
||||||
currency = models.PositiveSmallIntegerField(choices=Currencies.choices, null=False)
|
currency = models.PositiveSmallIntegerField(choices=Currencies.choices, null=False)
|
||||||
amount = models.DecimalField(max_digits=9, decimal_places=4, validators=[MinValueValidator(0.00001)])
|
amount = models.DecimalField(max_digits=9, decimal_places=4, validators=[MinValueValidator(0.00001)])
|
||||||
payment_method = models.CharField(max_length=50, null=False, default="not specified", blank=True)
|
payment_method = models.CharField(max_length=35, null=False, default="not specified", blank=True)
|
||||||
|
|
||||||
# order pricing method. A explicit amount of sats, or a relative premium above/below market.
|
# order pricing method. A explicit amount of sats, or a relative premium above/below market.
|
||||||
is_explicit = models.BooleanField(default=False, null=False)
|
is_explicit = models.BooleanField(default=False, null=False)
|
||||||
@ -212,8 +212,9 @@ class MarketTick(models.Model):
|
|||||||
|
|
||||||
def log_a_tick(order):
|
def log_a_tick(order):
|
||||||
'''
|
'''
|
||||||
Adds a new tick
|
Creates a new tick
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if not order.taker_bond:
|
if not order.taker_bond:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -227,6 +228,7 @@ class MarketTick(models.Model):
|
|||||||
volume=volume,
|
volume=volume,
|
||||||
premium=premium,
|
premium=premium,
|
||||||
currency=order.currency)
|
currency=order.currency)
|
||||||
|
|
||||||
tick.save()
|
tick.save()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
@ -178,7 +178,7 @@ export default class MakerPage extends Component {
|
|||||||
require={true}
|
require={true}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
style: {textAlign:"center"},
|
style: {textAlign:"center"},
|
||||||
maxLength: 50
|
maxLength: 35
|
||||||
}}
|
}}
|
||||||
onChange={this.handlePaymentMethodChange}
|
onChange={this.handlePaymentMethodChange}
|
||||||
/>
|
/>
|
||||||
|
@ -98,6 +98,8 @@ export default class OrderPage extends Component {
|
|||||||
.then((data) => (console.log(data) & this.getOrderDetails(data.id)));
|
.then((data) => (console.log(data) & this.getOrderDetails(data.id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
render (){
|
render (){
|
||||||
return (
|
return (
|
||||||
<Grid container spacing={1}>
|
<Grid container spacing={1}>
|
||||||
|
Reference in New Issue
Block a user