order sanity checks
This commit is contained in:
@@ -81,6 +81,7 @@ function buildTranches() {
|
||||
const order = props.order
|
||||
const builder = props.builder
|
||||
const tranches = []
|
||||
const warnings = []
|
||||
|
||||
console.log('buildTranches', builder, order, tranches)
|
||||
const ps = prices.value
|
||||
@@ -90,6 +91,9 @@ function buildTranches() {
|
||||
const w = ws[i]
|
||||
const t = newTranche({
|
||||
// todo start/end
|
||||
// todo check expired
|
||||
// if (endTime <= s.clock)
|
||||
// warnings.push(`Tranche already expired at ${new Date(endTime*1000)}`)
|
||||
fraction: w * MAX_FRACTION,
|
||||
})
|
||||
const symbol = co.selectedSymbol
|
||||
@@ -99,7 +103,7 @@ function buildTranches() {
|
||||
}
|
||||
if (!flipped.value)
|
||||
tranches.reverse()
|
||||
return tranches
|
||||
return {tranches, warnings}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user