auto market order fix

This commit is contained in:
Tim
2024-03-26 13:45:58 -04:00
parent d11ad7cf40
commit 9ab0f89950
3 changed files with 57 additions and 39 deletions

View File

@@ -25,6 +25,9 @@ const Order = {
}
// the key is order.id and the value is a function() that returns an order
export const orderFuncs = {}
// the key is order.builder.id and the value is a function() that returns an array of tranches
export const builderFuncs = {}
@@ -42,8 +45,7 @@ export const useChartOrderStore = defineStore('chart_orders', () => {
const drawingCallbacks = ref(null) // only during draw mode
function newOrder() {
console.log('cos new order')
const order = {id:uuid(), amount:1, amountIsTokenA: true, buy: true, builders:[newBuilder('MarketBuilder', {slippage:0.1})], }
const order = {id:uuid(), amount:1, amountIsTokenA: true, buy: true, builders:[] }
orders.value.push(order)
built.value.push({})
selectedOrder.value = order