@@ -24,12 +24,16 @@ describe('OpenDEX.assets-utils', () => {
24
24
} as unknown ) as GetBalanceResponse ;
25
25
const limitsMap = new Map ( ) ;
26
26
const baseAssetLimits = {
27
- getMaxsell : ( ) => 5000000 ,
28
- getMaxbuy : ( ) => 5000000 ,
27
+ getMaxSell : ( ) => 2500000 ,
28
+ getMaxBuy : ( ) => 2500000 ,
29
+ getReservedInbound : ( ) => 2500000 ,
30
+ getReservedOutbound : ( ) => 2500000 ,
29
31
} ;
30
32
const quoteAssetLimits = {
31
- getMaxsell : ( ) => 10000000 ,
32
- getMaxbuy : ( ) => 10000000 ,
33
+ getMaxSell : ( ) => 5000000 ,
34
+ getMaxBuy : ( ) => 5000000 ,
35
+ getReservedInbound : ( ) => 5000000 ,
36
+ getReservedOutbound : ( ) => 5000000 ,
33
37
} ;
34
38
limitsMap . set ( config . BASEASSET , baseAssetLimits ) ;
35
39
limitsMap . set ( config . QUOTEASSET , quoteAssetLimits ) ;
@@ -48,19 +52,27 @@ describe('OpenDEX.assets-utils', () => {
48
52
satsToCoinsStr ( baseAssetBalance . getChannelBalance ( ) )
49
53
) ,
50
54
baseAssetMaxOutbound : new BigNumber (
51
- satsToCoinsStr ( baseAssetLimits . getMaxsell ( ) )
55
+ satsToCoinsStr (
56
+ baseAssetLimits . getMaxSell ( ) + baseAssetLimits . getReservedOutbound ( )
57
+ )
52
58
) ,
53
59
baseAssetMaxInbound : new BigNumber (
54
- satsToCoinsStr ( baseAssetLimits . getMaxbuy ( ) )
60
+ satsToCoinsStr (
61
+ baseAssetLimits . getMaxBuy ( ) + baseAssetLimits . getReservedInbound ( )
62
+ )
55
63
) ,
56
64
quoteAssetBalance : new BigNumber (
57
65
satsToCoinsStr ( quoteAssetBalance . getChannelBalance ( ) )
58
66
) ,
59
67
quoteAssetMaxOutbound : new BigNumber (
60
- satsToCoinsStr ( quoteAssetLimits . getMaxsell ( ) )
68
+ satsToCoinsStr (
69
+ quoteAssetLimits . getMaxSell ( ) + quoteAssetLimits . getReservedOutbound ( )
70
+ )
61
71
) ,
62
72
quoteAssetMaxInbound : new BigNumber (
63
- satsToCoinsStr ( quoteAssetLimits . getMaxbuy ( ) )
73
+ satsToCoinsStr (
74
+ quoteAssetLimits . getMaxBuy ( ) + quoteAssetLimits . getReservedInbound ( )
75
+ )
64
76
) ,
65
77
} ) ;
66
78
} ) ;
@@ -153,8 +165,10 @@ describe('OpenDEX.assets-utils', () => {
153
165
} as unknown ) as GetBalanceResponse ;
154
166
const limitsMap = new Map ( ) ;
155
167
const baseAssetLimits = {
156
- getMaxsell : ( ) => 5000000 ,
157
- getMaxbuy : ( ) => 5000000 ,
168
+ getMaxSell : ( ) => 2500000 ,
169
+ getMaxBuy : ( ) => 2500000 ,
170
+ getReservedOutbound : ( ) => 2500000 ,
171
+ getReservedInbound : ( ) => 2500000 ,
158
172
} ;
159
173
limitsMap . set ( BASEASSET , baseAssetLimits ) ;
160
174
const tradingLimitsResponse = ( {
0 commit comments