Add requested currencies COP, PEN, UYU, PYG and BOB

This commit is contained in:
Reckless_Satoshi 2022-02-15 13:52:30 -08:00
parent fb5ef28b5d
commit e392f14b18
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
6 changed files with 24 additions and 14 deletions

View File

@ -24,7 +24,7 @@ class Currency(models.Model):
currency_choices = [(int(val), label) for val, label in list(currency_dict.items())] currency_choices = [(int(val), label) for val, label in list(currency_dict.items())]
currency = models.PositiveSmallIntegerField(choices=currency_choices, null=False, unique=True) currency = models.PositiveSmallIntegerField(choices=currency_choices, null=False, unique=True)
exchange_rate = models.DecimalField(max_digits=10, decimal_places=2, default=None, null=True, validators=[MinValueValidator(0)]) exchange_rate = models.DecimalField(max_digits=16, decimal_places=5, default=None, null=True, validators=[MinValueValidator(0)])
timestamp = models.DateTimeField(auto_now_add=True) timestamp = models.DateTimeField(auto_now_add=True)
def __str__(self): def __str__(self):

View File

@ -446,7 +446,10 @@ class UserView(APIView):
# Check if it is not a maker or taker! # Check if it is not a maker or taker!
not_participant, _, _ = Logics.validate_already_maker_or_taker(user) not_participant, _, _ = Logics.validate_already_maker_or_taker(user)
if not not_participant: if not not_participant:
return Response({'bad_request':'User cannot be deleted while he is part of an order'}, status.HTTP_400_BAD_REQUEST) return Response({'bad_request':'Maybe a mistake? User cannot be deleted while he is part of an order'}, status.HTTP_400_BAD_REQUEST)
# Check if has already a profile with
if user.profile.total_contracts > 0:
return Response({'bad_request':'Maybe a mistake? User cannot be deleted as it has completed trades'}, status.HTTP_400_BAD_REQUEST)
logout(request) logout(request)
user.delete() user.delete()

View File

@ -39,6 +39,7 @@ services:
volumes: volumes:
- .:/usr/src/robosats - .:/usr/src/robosats
- /mnt/development/database:/usr/src/database - /mnt/development/database:/usr/src/database
network_mode: service:tor
follow-invoices: follow-invoices:
build: . build: .

View File

@ -29,5 +29,6 @@ export default function getFlags(code){
if(code == 'TRY') return '🇹🇷'; if(code == 'TRY') return '🇹🇷';
if(code == 'USD') return '🇺🇸'; if(code == 'USD') return '🇺🇸';
if(code == 'ZAR') return '🇿🇦'; if(code == 'ZAR') return '🇿🇦';
if(code == 'COP') return '🇨🇴';
return '🏳'; return '🏳';
}; };

View File

@ -19,15 +19,20 @@
"18":"ZAR", "18":"ZAR",
"19":"TRY", "19":"TRY",
"20":"BRL", "20":"BRL",
"21": "CLP", "21":"CLP",
"22": "CZK", "22":"CZK",
"23": "DKK", "23":"DKK",
"24": "HRK", "24":"HRK",
"25": "HUF", "25":"HUF",
"26": "INR", "26":"INR",
"27": "ISK", "27":"ISK",
"28": "PLN", "28":"PLN",
"29": "RON", "29":"RON",
"30": "ARS", "30":"ARS",
"31": "VES" "31":"VES",
"32":"COP",
"33":"PEN",
"34":"UYU",
"35":"PYG",
"36":"BOB"
} }

File diff suppressed because one or more lines are too long