From b24bd4c2db563deff1e356654132a8b77770fc8e Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 15 May 2022 23:47:22 -0700 Subject: [PATCH] Constrain open dispute valid status --- api/logics.py | 8 ++++++++ docs/_pages/docs/03-wallets.md | 10 +++++----- docs/assets/css/main.scss | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/api/logics.py b/api/logics.py index 749011fa..4bf2032b 100644 --- a/api/logics.py +++ b/api/logics.py @@ -379,6 +379,14 @@ class Logics: # for unresolved HTLCs) Dispute winner will have to submit a # new invoice for value of escrow + bond. + valid_status_open_disppute = [ + Order.Status.CHA, + Order.Status.FSE, + ] + + if order.status in valid_status_open_disppute: + return False, {"bad_request": "You cannot open a dispute of this order at this stage"} + if not order.trade_escrow.status == LNPayment.Status.SETLED: cls.settle_escrow(order) cls.settle_bond(order.maker_bond) diff --git a/docs/_pages/docs/03-wallets.md b/docs/_pages/docs/03-wallets.md index bb0436b4..3950c51a 100644 --- a/docs/_pages/docs/03-wallets.md +++ b/docs/_pages/docs/03-wallets.md @@ -9,23 +9,23 @@ sidebar: nav: docs # Icons -good: "" -soso: "" +good: "" +soso: "" bad: "" phone: "" laptop: "" cli: "" laptop_phone: "" remote: "" -thumbsup: "" -thumbsdown: "" +thumbsup: "" +thumbsdown: "" unclear: "" bitcoin: "" --- ## Wallet Compatibility Table | Wallet | Version | Device | UX1 | Bonds2 | Payout3 | Comp4 | Total5 | -|---|---|---|---|---|---|---|---| +|:---|:---|:--:|:--:|:--:|:--:|:--:|:--:| |[Blixt](#blixt-androidios-lnd-light-backend-on-device)|[v0.4.1](https://github.com/hsjoberg/blixt-wallet)|{{page.phone}}|{{page.soso}}|{{page.good}}|{{page.good}}|{{page.good}}|{{page.thumbsup}}| |[Electrum](#electrum-desktop)|[4.1.4](https://github.com/spesmilo/electrum)|{{page.laptop}}|{{page.good}}|{{page.soso}}|{{page.soso}}|{{page.soso}}|{{page.unclear}}|| |[LND](#zeus-mobile-lnd-remote-backend)|[v0.14.2](https://github.com/LightningNetwork/lnd)|{{page.cli}}|{{page.good}}|{{page.good}}|{{page.good}}|{{page.good}}|{{page.thumbsup}}| diff --git a/docs/assets/css/main.scss b/docs/assets/css/main.scss index 23346e77..80ba817c 100644 --- a/docs/assets/css/main.scss +++ b/docs/assets/css/main.scss @@ -5,4 +5,4 @@ @charset "utf-8"; @import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin -@import "minimal-mistakes"; // main partials \ No newline at end of file +@import "minimal-mistakes"; // main partials