disabled fees by default; chart order placement working!

This commit is contained in:
Tim
2024-03-23 19:39:34 -04:00
parent 0d0200009e
commit 6ee442d7ec
2 changed files with 6 additions and 3 deletions

View File

@@ -24,10 +24,13 @@ export const DISTANT_FUTURE = uint32max
// }
export function newOrder(tokenIn, tokenOut, exchange, fee, amount, amountIsInput, tranches,
minFillAmount=null, outputDirectlyToOwner = false, chainOrder = NO_CHAIN) {
amountIsInput = !!amountIsInput // force convert to bool
outputDirectlyToOwner = !!outputDirectlyToOwner // force convert to bool
amount = BigInt(amount)
if (!tranches)
tranches = [newTranche({marketOrder: true})] // todo this is just a swap: issue warning?
if( minFillAmount === null )
minFillAmount = BigInt(amount) / 100n // default to min trade size of 1%
minFillAmount = amount / 100n // default to min trade size of 1%
return {
tokenIn, tokenOut, route:{exchange, fee},
amount, minFillAmount, amountIsInput,