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

@@ -3,9 +3,9 @@
<td>
<v-avatar v-if="imageSrc" :image="imageSrc"/>
</td>
<td class="d-none d-sm-table-cell">{{ token.name || '' }}</td>
<td class="d-none d-sm-table-cell">{{ token.n || '' }}</td>
<td class="text-right">{{ fixed }}</td>
<td class="text-left">{{ token.symbol }}</td>
<td class="text-left">{{ token.s }}</td>
<!-- todo price and value columns -->
<td>
<v-menu>
@@ -13,9 +13,9 @@
<v-btn variant="plain" v-bind="props" icon="mdi-dots-vertical"/>
</template>
<v-list>
<v-list-subheader :title="token.symbol"/>
<v-list-subheader :title="token.s"/>
<v-list-item title="Withdraw" key="withdraw" value="withdraw" prepend-icon="mdi-arrow-down-bold"
@click="()=>onWithdraw(token.address)"/>
@click="()=>onWithdraw(token.a)"/>
</v-list>
</v-menu>
</td>
@@ -31,9 +31,9 @@ import {computed, ref} from "vue";
const s = useStore()
const props = defineProps(['addr', 'amount', 'onWithdraw'])
const token = await getToken(props.addr)
const fixed = computed(() => FixedNumber.fromValue(props.amount, token.decimals, {
const fixed = computed(() => FixedNumber.fromValue(props.amount, token.d, {
width: 256,
decimals: token.decimals
decimals: token.d
}))
const imageSrc = computed(() => token.image)
</script>