Create a BTC {this.state.type==0 ? "buy":"sell"} order for {this.state.amount} {this.state.currencyCode}
diff --git a/frontend/src/components/OrderPage.js b/frontend/src/components/OrderPage.js
index 6deef6bf..86ed50ec 100644
--- a/frontend/src/components/OrderPage.js
+++ b/frontend/src/components/OrderPage.js
@@ -68,6 +68,7 @@ export default class OrderPage extends Component {
isBuyer:data.buyer,
isSeller:data.seller,
expiresAt:data.expires_at,
+ badRequest:data.bad_request,
});
});
}
@@ -87,8 +88,10 @@ export default class OrderPage extends Component {
console.log(this.state)
const requestOptions = {
method: 'POST',
- headers: {'Content-Type':'application/json', 'X-CSRFToken': getCookie('csrftoken')},
- body: JSON.stringify({}),
+ headers: {'Content-Type':'application/json', 'X-CSRFToken': getCookie('csrftoken'),},
+ body: JSON.stringify({
+ 'action':'take',
+ }),
};
fetch('/api/order/' + '?order_id=' + this.orderId, requestOptions)
.then((response) => response.json())
diff --git a/frontend/src/components/UserGenPage.js b/frontend/src/components/UserGenPage.js
index 0332043b..ef7d9c98 100644
--- a/frontend/src/components/UserGenPage.js
+++ b/frontend/src/components/UserGenPage.js
@@ -58,7 +58,7 @@ export default class UserGenPage extends Component {
delGeneratedUser() {
const requestOptions = {
method: 'DELETE',
- headers: {'Content-Type':'application/json', 'X-CSRFToken': csrftoken},
+ headers: {'Content-Type':'application/json', 'X-CSRFToken': getCookie('csrftoken')},
};
fetch("/api/usergen", requestOptions)
.then((response) => response.json())
diff --git a/setup.md b/setup.md
index c9c82cbf..c1cbf307 100644
--- a/setup.md
+++ b/setup.md
@@ -4,7 +4,10 @@
`sudo apt install python3 python3 pip`
### Install virtual environments
-`pip install virtualenvwrapper`
+```
+pip install virtualenvwrapper
+pip install python-decouple
+```
### Add to .bashrc