Skip to content

Commit

Permalink
feat: display token names (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 authored Aug 22, 2023
1 parent fad0b7c commit b931e3f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions components/token/TokenBalance.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<TokenLine
:symbol="symbol"
:name="name"
:address="address"
:decimals="decimals"
:icon-url="iconUrl"
Expand Down Expand Up @@ -56,6 +57,9 @@ const props = defineProps({
type: String,
required: true,
},
name: {
type: String,
},
address: {
type: String,
required: true,
Expand Down
12 changes: 11 additions & 1 deletion components/token/TokenLine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
</template>
<template #default>
<CommonButtonLineBodyInfo class="text-left">
<template #label>{{ symbol }}</template>
<template #label>
<div class="flex flex-wrap items-center gap-1.5">
<span>{{ symbol }}</span>
<div v-if="name" class="truncate text-xs text-gray-secondary dark:text-neutral-400">
{{ name }}
</div>
</div>
</template>
<template #underline>
<span class="hidden xs:block" :title="address">{{ shortenAddress(address, 5) }}</span>
<span class="xs:hidden" :title="address">{{ shortenAddress(address, 2) }}</span>
Expand All @@ -32,6 +39,9 @@ defineProps({
type: String,
required: true,
},
name: {
type: String,
},
address: {
type: String,
required: true,
Expand Down
1 change: 1 addition & 0 deletions utils/zksync/era/token-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const getTokensByNetworkId = async (networkId: number) => {
l1Address: checksumAddress(token.l1Address),
address: l2Address,
symbol: token.symbol,
name: token.name,
decimals: token.decimals,
iconUrl: token.imageUrl,
enabledForFees: l2Address === ETH_L2_ADDRESS,
Expand Down

0 comments on commit b931e3f

Please sign in to comment.