File tree 3 files changed +4
-2
lines changed
3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ const getGrpcError = (err: any) => {
49
49
case orderErrorCodes . MARKET_ORDERS_NOT_ALLOWED :
50
50
case serviceErrorCodes . NOMATCHING_MODE_IS_REQUIRED :
51
51
case orderErrorCodes . INSUFFICIENT_OUTBOUND_BALANCE :
52
+ case orderErrorCodes . QUANTITY_ON_HOLD :
52
53
case swapErrorCodes . SWAP_CLIENT_NOT_FOUND :
53
54
case swapErrorCodes . SWAP_CLIENT_MISCONFIGURED :
54
55
code = status . FAILED_PRECONDITION ;
Original file line number Diff line number Diff line change @@ -480,9 +480,10 @@ class OrderBook extends EventEmitter {
480
480
}
481
481
}
482
482
483
- assert ( ! ( replaceOrderId && discardRemaining ) , 'can not replace order and discard remaining order' ) ;
484
483
let replacedOrderIdentifier : OrderIdentifier | undefined ;
485
484
if ( replaceOrderId ) {
485
+ assert ( ! discardRemaining , 'can not replace order and discard remaining order' ) ;
486
+
486
487
// put the order we are replacing on hold while we place the new order
487
488
replacedOrderIdentifier = this . localIdMap . get ( replaceOrderId ) ;
488
489
if ( ! replacedOrderIdentifier ) {
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ const errors = {
72
72
code : errorCodes . MIN_QUANTITY_VIOLATED ,
73
73
} ) ,
74
74
QUANTITY_ON_HOLD : ( localId : string , holdQuantity : number ) => ( {
75
- message : `order with local id ${ localId } has a quantity of ${ holdQuantity } on hold` ,
75
+ message : `order with local id ${ localId } has a quantity of ${ holdQuantity } satoshis on hold, try again later ` ,
76
76
code : errorCodes . QUANTITY_DOES_NOT_MATCH ,
77
77
} ) ,
78
78
} ;
You can’t perform that action at this time.
0 commit comments