token metadata fixes for vault and orders view; faucet fix

This commit is contained in:
Tim
2024-03-26 14:55:07 -04:00
parent 9ab0f89950
commit 9e2f11b421
9 changed files with 95 additions and 56 deletions

View File

@@ -1,5 +1,5 @@
<template>
<span>{{fmtAmount}} {{ raw ? '' : (token.symbol || '') }}</span>
<span>{{fmtAmount}} {{ raw ? '' : (token.s || '') }}</span>
</template>
<script setup>
@@ -14,9 +14,9 @@ const token = await getToken(props.addr)
const fmtAmount = computed(() => {
if( props.amount === null || props.amount === undefined )
return ''
return FixedNumber.fromValue(props.amount, token.decimals, {
return FixedNumber.fromValue(props.amount, token.d, {
width: 256,
decimals: token.decimals
decimals: token.d
}).toUnsafeFloat().toPrecision(5) // todo precision
})
</script>