route price lookup fixes
This commit is contained in:
@@ -21,11 +21,10 @@ const price = computed(()=>{
|
||||
if( !route || !(route.pool in s.poolPrices) )
|
||||
return ''
|
||||
let p = s.poolPrices[route.pool]
|
||||
console.log('pool price is',typeof p, p)
|
||||
if( !p )
|
||||
return ''
|
||||
p = Number(p) // TODO: Temporary workaround. Better to fix reason for p being set to string.
|
||||
console.log('pool price is',typeof p, p)
|
||||
p = FixedNumber.fromString(p)
|
||||
p = FixedNumber.fromString(p).toUnsafeFloat()
|
||||
if( props.inverted )
|
||||
p = 1/p
|
||||
return p.toPrecision(props.precision)
|
||||
|
||||
Reference in New Issue
Block a user