orderbuild fixes; tranche table work; ordershapes still broken

This commit is contained in:
tim
2024-09-20 04:12:23 -04:00
parent ce54b943ea
commit e5d5c9c0d8
10 changed files with 111 additions and 48 deletions

View File

@@ -12,10 +12,14 @@ const token = await getToken(props.chainId, props.addr)
const fmtAmount = computed(() => {
if( props.amount === null || props.amount === undefined )
return ''
return FixedNumber.fromValue(props.amount, token.d, {
const fixed = FixedNumber.fromValue(props.amount, token.d, {
width: 256,
decimals: token.d
}).toUnsafeFloat().toPrecision(5) // todo precision
})
let p = fixed.toUnsafeFloat().toPrecision(5);
if (p.includes('e'))
p = parseFloat(p)
return p
})
</script>