mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-21 02:19:47 +00:00
nova: trading fixes (#117)
* nova: loop through All orders and flush * nova: fix CancelOrder
This commit is contained in:
parent
755f999884
commit
0402b68fcd
1 changed files with 4 additions and 2 deletions
|
@ -8,7 +8,9 @@ function doNovaCancelOrder($id=false)
|
||||||
|
|
||||||
$res = nova_api_user("cancelorder/{$id}");
|
$res = nova_api_user("cancelorder/{$id}");
|
||||||
|
|
||||||
if ($res->success === TRUE) {
|
if (!is_object($res)) return;
|
||||||
|
|
||||||
|
if ($res->status == 'ok') {
|
||||||
$db_order = getdbosql(
|
$db_order = getdbosql(
|
||||||
'db_orders',
|
'db_orders',
|
||||||
'market=:market AND uuid=:uuid',
|
'market=:market AND uuid=:uuid',
|
||||||
|
@ -128,7 +130,7 @@ function doNovaTrading($quick=false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = getdbolist('db_orders', "coinid=$coin->id and market='$exchange'");
|
$list = getdbolist('db_orders', "market='$exchange'");
|
||||||
foreach ($list as $db_order) {
|
foreach ($list as $db_order) {
|
||||||
$coin = getdbo('db_coins', $db_order->coinid);
|
$coin = getdbo('db_coins', $db_order->coinid);
|
||||||
if(!$coin) continue;
|
if(!$coin) continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue