token amount bugfixes

This commit is contained in:
Tim
2024-03-27 16:18:44 -04:00
parent 204c63f1b9
commit 6a01e5bab8
3 changed files with 20 additions and 19 deletions

View File

@@ -6,11 +6,11 @@
import {useStore} from "@/store/store";
import {getToken} from "@/blockchain/token.js";
import {FixedNumber} from "ethers";
import {computed, ref} from "vue";
import {computed} from "vue";
const s = useStore()
const props = defineProps(['addr', 'amount', 'raw'])
const token = await getToken(props.addr)
const token = await getToken(s.chainId, props.addr)
const fmtAmount = computed(() => {
if( props.amount === null || props.amount === undefined )
return ''