updated SwapOrderStatus with Andrew's changes

This commit is contained in:
tim
2024-08-26 17:27:58 -04:00
parent e0f42f80e7
commit 55397c2b1c
5 changed files with 15 additions and 12 deletions

View File

@@ -82,8 +82,14 @@ export function newTranche({
} = {}) {
if( minIntercept === 0 && minSlope === 0 && maxIntercept === 0 && maxSlope === 0 )
marketOrder = true
if( marketOrder )
if( marketOrder ) {
if (minIntercept !== 0 || minSlope !== 0 || maxIntercept !== 0 || maxSlope !== 0)
console.warn('Ignoring line information in a market order')
minIntercept = encodeIEE754(slippage) // this is the slippage field for market orders
minSlope = 0
maxIntercept = 0
maxSlope = 0
}
else {
minIntercept = encodeIEE754(minIntercept)
minSlope = encodeIEE754(minSlope)