price handling fixes affecting orderbuild, pairprice, ordershapes, etc

This commit is contained in:
tim
2024-10-13 18:28:01 -04:00
parent 4b5626094a
commit fe8dd3ef6c
8 changed files with 16 additions and 17 deletions

View File

@@ -156,7 +156,7 @@ const maxAmount = computed(()=>{
return null
const balance = s.balances[token.a]
if( !balance )
return 0
return null
const divisor = os.amountIsTotal ? 1 : os.tranches
return balance / 10**token.d / divisor
})
@@ -165,7 +165,7 @@ const available = computed(()=>{
return max === null ? '' : `Available: ${maxAmount.value} ${tokenIn.value.s}`
})
const lastMaxValue = ref(null)
const lastMaxValue = ref(-1)
function setMax() {
let amount = maxAmount.value