From 4f5d16905a0722b4fd20ea721f9165a83233fe45 Mon Sep 17 00:00:00 2001 From: dimxy Date: Thu, 25 Apr 2019 20:28:26 +0500 Subject: [PATCH] corr check open/closed --- src/cc/prices.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc/prices.cpp b/src/cc/prices.cpp index 5fca48739..df7817876 100644 --- a/src/cc/prices.cpp +++ b/src/cc/prices.cpp @@ -1112,7 +1112,7 @@ UniValue PricesRekt(int64_t txfee, uint256 bettxid, int32_t rektheight) std::vector bets; BetInfo bet1; - if (CCgetspenttxid(finaltxid, vini, finalheight, bettxid, 2) < 0) { + if (CCgetspenttxid(finaltxid, vini, finalheight, bettxid, 2) == 0) { result.push_back(Pair("result", "error")); result.push_back(Pair("error", "position closed")); return result; @@ -1202,7 +1202,7 @@ UniValue PricesCashout(int64_t txfee, uint256 bettxid) std::vector bets; BetInfo bet1; - if (CCgetspenttxid(finaltxid, vini, finalheight, bettxid, 2) < 0) { + if (CCgetspenttxid(finaltxid, vini, finalheight, bettxid, 2) == 0) { result.push_back(Pair("result", "error")); result.push_back(Pair("error", "position closed")); return result; @@ -1282,7 +1282,7 @@ UniValue PricesInfo(uint256 bettxid, int32_t refheight) std::vector bets; BetInfo bet1; - if (CCgetspenttxid(finaltxid, vini, finalheight, bettxid, 2) < 0) + if (CCgetspenttxid(finaltxid, vini, finalheight, bettxid, 2) == 0) result.push_back(Pair("status", "closed")); else result.push_back(Pair("status", "open"));