diff --git a/README.md b/README.md
index 224c0bf5..fbaec15a 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## RoboSats - Buy and sell Satoshis Privately.
+## RoboSats - Buy and sell Satoshis Privately
[![release](https://img.shields.io/badge/release-v0.1.0%20MVP-orange)](https://github.com/Reckless-Satoshi/robosats/releases)
[![AGPL-3.0 license](https://img.shields.io/badge/license-AGPL--3.0-blue)](https://github.com/Reckless-Satoshi/robosats/blob/main/LICENSE)
[![Telegram](https://img.shields.io/badge/chat-telegram-brightgreen)](https://t.me/robosats)
@@ -15,7 +15,7 @@ RoboSats is a simple and private way to exchange bitcoin for national currencies
**Bitcoin testnet:**
- Tor: robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion (Active - On Dev Node)
- Url: testnet.robosats.com (Coming soon)
-- Commit height: Latest commit.
+- Latest commit.
*Always use [Tor Browser](https://www.torproject.org/download/) and .onion for best anonymity.*
diff --git a/api/logics.py b/api/logics.py
index 391507b1..86863f8c 100644
--- a/api/logics.py
+++ b/api/logics.py
@@ -409,7 +409,7 @@ class Logics():
# 4.a) When maker cancel after bond (before escrow)
'''The order into cancelled status if maker cancels.'''
- elif order.status > Order.Status.PUB and order.status < Order.Status.CHA and order.maker == user:
+ elif order.status in [Order.Status.PUB, Order.Status.TAK, Order.Status.WF2, Order.Status.WFE] and order.maker == user:
#Settle the maker bond (Maker loses the bond for canceling an ongoing trade)
valid = cls.settle_bond(order.maker_bond)
if valid:
diff --git a/api/models.py b/api/models.py
index ba780c6d..b3837a91 100644
--- a/api/models.py
+++ b/api/models.py
@@ -226,7 +226,7 @@ class Profile(models.Model):
avatar = models.ImageField(default="static/assets/misc/unknown_avatar.png", verbose_name='Avatar', blank=True)
# Penalty expiration (only used then taking/cancelling repeatedly orders in the book before comitting bond)
- penalty_expiration = models.DateTimeField(null=True)
+ penalty_expiration = models.DateTimeField(null=True,default=None, blank=True)
@receiver(post_save, sender=User)
def create_user_profile(sender, instance, created, **kwargs):
diff --git a/api/views.py b/api/views.py
index 8817cd4a..a34b0bb0 100644
--- a/api/views.py
+++ b/api/views.py
@@ -108,7 +108,7 @@ class OrderView(viewsets.ViewSet):
# if user is under a limit (penalty), inform him.
is_penalized, time_out = Logics.is_penalized(request.user)
if is_penalized:
- data['penalty'] = time_out
+ data['penalty'] = request.user.profile.penalty_expiration
# Add booleans if user is maker, taker, partipant, buyer or seller
data['is_maker'] = order.maker == request.user
diff --git a/frontend/src/components/OrderPage.js b/frontend/src/components/OrderPage.js
index 2412084f..a69d3422 100644
--- a/frontend/src/components/OrderPage.js
+++ b/frontend/src/components/OrderPage.js
@@ -143,6 +143,19 @@ export default class OrderPage extends Component {
}
};
+ // Countdown Renderer callback with condition
+ countdownPenaltyRenderer = ({ minutes, seconds, completed }) => {
+ if (completed) {
+ // Render a completed state
+ return ( nothing. Good to go!);
+
+ } else {
+ return (
+ {zeroPad(minutes)}m {zeroPad(seconds)}s
+ );
+ }
+ };
+
LinearDeterminate =()=> {
const [progress, setProgress] = React.useState(0);
@@ -432,7 +445,7 @@ export default class OrderPage extends Component {
- You cannot take an order yet! Wait {this.state.penalty} seconds
+ You cannot take an order yet! Wait
>