orderbuild fixes; tranche table work; ordershapes still broken
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user