vault balances UI

This commit is contained in:
Tim Olson
2023-10-30 23:44:05 -04:00
parent 6d99975a9e
commit ee61c96d38
9 changed files with 124 additions and 22 deletions

View File

@@ -0,0 +1,27 @@
<template>
<tr>
<td><v-img v-if="imageSrc" :src="imageSrc"/></td>
<td>{{token.symbol}}</td>
<td class="d-none d-sm-table-cell">{{token.name||''}}</td>
<td>{{fixed}}</td>
<td><!-- todo actions --></td>
</tr>
</template>
<script setup>
import {useStore} from "@/store/store";
import {getToken} from "@/blockchain/token.js";
import {FixedNumber} from "ethers";
import {computed} from "vue";
const s = useStore()
const props = defineProps(['addr','amount'])
const token = await getToken(props.addr)
console.log('token', props.addr, token)
const fixed = computed(()=>FixedNumber.fromValue(props.amount, token.decimals, {width:256, decimals: token.decimals}))
const imageSrc = computed(()=>null )
</script>
<style scoped lang="scss">
@use "src/styles/vars" as *;
</style>