order amount bugfix
This commit is contained in:
@@ -150,6 +150,8 @@ export const useOrderStore = defineStore('order', ()=> {
|
||||
const limitIsMinimum = computed(() => !(buy.value ^ inverted.value))
|
||||
const amountToken = computed(() => amountIsTokenA.value ? tokenA.value : tokenB.value)
|
||||
const amountIsInput = computed(() => amountIsTokenA.value !== buy.value)
|
||||
const totalAmount = computed(()=> amountIsTotal.value ? amount.value : amount.value * tranches.value )
|
||||
const trancheAmount = computed(()=> amountIsTotal.value ? amount.value / tranches.value : amount.value )
|
||||
|
||||
function setDefaultTokens(tokens) {
|
||||
if( tokens.length > 0 )
|
||||
@@ -161,6 +163,6 @@ export const useOrderStore = defineStore('order', ()=> {
|
||||
return {
|
||||
tokenA, tokenB, buy, inverted, amount, amountIsTokenA, amountIsTotal, limitPrice, limitPrice2, tranches,
|
||||
interval, intervalIsTotal, timeUnitIndex, routes, routesPending, validOrder, route, base, quote, pairSymbol,
|
||||
limitIsMinimum, amountToken, amountIsInput, setDefaultTokens,
|
||||
limitIsMinimum, amountToken, amountIsInput, setDefaultTokens, totalAmount, trancheAmount,
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user