symbol rework; fee % switching; symbol search improvements
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
<td>
|
||||
<v-avatar v-if="imageSrc" :image="imageSrc" size="x-small"/>
|
||||
</td>
|
||||
<td class="d-none d-sm-table-cell">{{ token.n || '' }}</td>
|
||||
<td class="d-none d-sm-table-cell">{{ token?.n || '' }}</td>
|
||||
<td class="text-right">{{ fixed }}</td>
|
||||
<td class="text-left">{{ token.s }}</td>
|
||||
<td class="text-left">{{ token?.s }}</td>
|
||||
<!-- todo price and value columns -->
|
||||
<td>
|
||||
<v-menu>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-btn variant="plain" v-bind="props" icon="mdi-dots-vertical"/>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list v-if="token">
|
||||
<v-list-subheader :title="token.s"/>
|
||||
<v-list-item title="Withdraw" key="withdraw" value="withdraw" prepend-icon="mdi-arrow-down-bold"
|
||||
@click="()=>onWithdraw(token.a)"/>
|
||||
@@ -26,16 +26,17 @@
|
||||
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(['chainId', 'addr', 'amount', 'onWithdraw'])
|
||||
const token = await getToken(props.chainId, props.addr)
|
||||
const fixed = computed(() => FixedNumber.fromValue(props.amount, token.d, {
|
||||
console.log('TokenRow token is', token)
|
||||
const fixed = computed(() => token ? FixedNumber.fromValue(props.amount, token.d, {
|
||||
width: 256,
|
||||
decimals: token.d
|
||||
}))
|
||||
const imageSrc = computed(() => token.image)
|
||||
}) : null)
|
||||
const imageSrc = computed(() => token ? token.image : null)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user