diff --git a/api/lightning/node.py b/api/lightning/node.py index 092db860..cbcdbf25 100644 --- a/api/lightning/node.py +++ b/api/lightning/node.py @@ -81,7 +81,7 @@ class LNNode(): memo=description, value=num_satoshis, hash=r_hash, - expiry=int(invoice_expiry*1.15), # actual expiry is padded by 15% + expiry=int(invoice_expiry*1.5), # actual expiry is padded by 50%, if tight, wrong client system clock will say invoice is expired. cltv_expiry=cltv_expiry_blocks, ) response = cls.invoicesstub.AddHoldInvoice(request, metadata=[('macaroon', MACAROON.hex())]) diff --git a/api/tasks.py b/api/tasks.py index 6602faaa..3d6ef69c 100644 --- a/api/tasks.py +++ b/api/tasks.py @@ -21,7 +21,7 @@ def users_cleansing(): for user in queryset: if not user.profile.total_contracts == 0: continue - valid, _ = Logics.validate_already_maker_or_taker(user) + valid, _, _ = Logics.validate_already_maker_or_taker(user) if valid: deleted_users.append(str(user)) user.delete() diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js index 4186be22..7532249b 100644 --- a/frontend/src/components/App.js +++ b/frontend/src/components/App.js @@ -20,12 +20,7 @@ export default class App extends Component { render() { return ( <> -
-
-
- -
); } diff --git a/frontend/src/components/BottomBar.js b/frontend/src/components/BottomBar.js index 8fb7cc07..7ec0487d 100644 --- a/frontend/src/components/BottomBar.js +++ b/frontend/src/components/BottomBar.js @@ -1,6 +1,7 @@ import React, { Component } from 'react' import {Badge, TextField, ListItemAvatar, Avatar,Paper, Grid, IconButton, Typography, Select, MenuItem, List, ListItemText, ListItem, ListItemIcon, ListItemButton, Divider, Dialog, DialogContent} from "@mui/material"; import MediaQuery from 'react-responsive' +import { Link } from 'react-router-dom' // Icons import SettingsIcon from '@mui/icons-material/Settings'; @@ -209,7 +210,7 @@ export default class BottomBar extends Component { {this.state.active_order_id ? // TODO Link to router and do this.props.history.push - + diff --git a/frontend/src/components/HomePage.js b/frontend/src/components/HomePage.js index 2d61c892..59d84bb6 100644 --- a/frontend/src/components/HomePage.js +++ b/frontend/src/components/HomePage.js @@ -1,24 +1,43 @@ import React, { Component } from "react"; -import { BrowserRouter as Router, Switch, Route, Link, Redirect } from "react-router-dom"; +import { BrowserRouter as Router, Switch, Route, Link, Redirect,useHistory } from "react-router-dom"; import UserGenPage from "./UserGenPage"; import MakerPage from "./MakerPage"; import BookPage from "./BookPage"; import OrderPage from "./OrderPage"; +import BottomBar from "./BottomBar"; + export default class HomePage extends Component { constructor(props) { super(props); + this.state = { + nickname: null, + token: null, + } + } + + setAppState=(newState)=>{ + this.setState(newState) + } + + redirectTo(location) { + this.props.history.push(location); } render() { return ( - - }/> - - - - +
+ + }/> + + + + +
+
+ +
); } diff --git a/frontend/src/components/InfoDialog.js b/frontend/src/components/InfoDialog.js index f04ddf88..24bad0de 100644 --- a/frontend/src/components/InfoDialog.js +++ b/frontend/src/components/InfoDialog.js @@ -40,15 +40,10 @@ export default class InfoDialog extends Component {

It is a BTC/FIAT peer-to-peer exchange over lightning. It simplifies matchmaking and minimizes the need of trust. RoboSats focuses in privacy and speed.

-
- -

RoboSats is an open source project (GitHub).

diff --git a/frontend/src/components/OrderPage.js b/frontend/src/components/OrderPage.js index 36d2a292..db6c53c7 100644 --- a/frontend/src/components/OrderPage.js +++ b/frontend/src/components/OrderPage.js @@ -120,11 +120,6 @@ export default class OrderPage extends Component { this.getOrderDetails(); } - // Fix to use proper react props - handleClickBackButton=()=>{ - window.history.back(); - } - // Countdown Renderer callback with condition countdownRenderer = ({ total, hours, minutes, seconds, completed }) => { if (completed) { @@ -506,7 +501,7 @@ export default class OrderPage extends Component { - + } @@ -573,7 +568,7 @@ export default class OrderPage extends Component { {this.state.bad_request}
- + : (this.state.is_participant ? diff --git a/frontend/static/assets/images/robosats_0.1.0_banner.png b/frontend/static/assets/images/robosats_0.1.0_banner.png new file mode 100755 index 00000000..95f51f5b Binary files /dev/null and b/frontend/static/assets/images/robosats_0.1.0_banner.png differ