@@ -331,10 +331,8 @@ describe('API Service', () => {
331331 btcUsdt . set ( 'BTC/USDT' , {
332332 buyArray : [ ] ,
333333 sellArray : [
334- { quantity : 0.00045 , price : 15000 , pairId : 'BTC/USDT' , id : 'test_1' , createdAt : 1 , side : OrderSide . Sell ,
334+ { quantity : 0.38919755 , price : 12082.5528 , pairId : 'BTC/USDT' , id : 'test_1' , createdAt : 1 , side : OrderSide . Sell ,
335335 isOwnOrder : false , nodeIdentifier : { nodePubKey : 'some_key1' } } ,
336- { quantity : 1.05 , price : 20000 , pairId : 'BTC/USDT' , id : 'test_2' , createdAt : 1 , side : OrderSide . Sell ,
337- isOwnOrder : false , nodeIdentifier : { nodePubKey : 'some_key2' } } ,
338336 ] ,
339337 } ) ;
340338 const ethBtc = new Map < string , ServiceOrderSidesArrays > ( ) ;
@@ -425,20 +423,20 @@ describe('API Service', () => {
425423 const tradingLimitsMap = new Map < string , TradingLimits > ( ) ;
426424 tradingLimitsMap . set ( 'BTC' , {
427425 maxSell : 0 ,
428- maxBuy : 1.025 ,
426+ maxBuy : 2.4499095 ,
429427 reservedOutbound : 0 ,
430428 reservedInbound : 0 ,
431429 } ) ;
432430 tradingLimitsMap . set ( 'USDT' , {
433- maxSell : 5 ,
431+ maxSell : 1000 ,
434432 maxBuy : 0 ,
435433 reservedOutbound : 0 ,
436434 reservedInbound : 0 ,
437435 } ) ;
438436 tradingLimitsStub . returns ( Promise . resolve ( tradingLimitsMap ) ) ;
439437
440438 const number = await service [ 'calculateOrderMaxQuantity' ] ( 'BTC' , 'USDT' , OrderSide . Buy , undefined , SwapClientType . Lnd , SwapClientType . Connext ) ;
441- await expect ( number ) . to . equal ( 0.0003333333333333333 ) ;
439+ await expect ( number ) . to . equal ( 0.08276396689944529 ) ;
442440 } ) ;
443441
444442 it ( 'should return min(max amount of base using max sell bound for quote, buy max base) lnd/connext mkt buy - 2' , async ( ) => {
@@ -458,7 +456,7 @@ describe('API Service', () => {
458456 tradingLimitsStub . returns ( Promise . resolve ( tradingLimitsMap ) ) ;
459457
460458 const number = await service [ 'calculateOrderMaxQuantity' ] ( 'BTC' , 'USDT' , OrderSide . Buy , undefined , SwapClientType . Lnd , SwapClientType . Connext ) ;
461- await expect ( number ) . to . equal ( 0.00006666666666666667 ) ;
459+ await expect ( number ) . to . equal ( 0.0000827639668994453 ) ;
462460 } ) ;
463461
464462 it ( 'should return (uses max sell bound for quote to calculate base amount) connext/lnd mkt buy' , async ( ) => {
0 commit comments