Skip to content

Commit

Permalink
fix: bug not found contractMethodName
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Oct 31, 2022
1 parent c777229 commit 1a95a9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,6 @@ export const getEnvNumber = (key): number => {
}

export const capitalizeFirstLetter = (text: string) => {
if (!text) return ''
return text.charAt(0).toUpperCase() + text.slice(1)
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ const ContractTransaction = ({ transaction }: Props) => {
>
{ellipseBetweenText(transaction.hash, 20, 20)}
</Typography.LinkText>
<Typography.Label
text={capitalizeFirstLetter(transaction.contractMethodName)}
backgroundShape="rectangle"
radius="radius-2xl"
font="text-bold text text-sm"
/>
{transaction.contractMethodName && (
<Typography.Label
text={capitalizeFirstLetter(transaction.contractMethodName)}
backgroundShape="rectangle"
radius="radius-2xl"
font="text-bold text text-sm"
/>
)}
</Row>
{(transaction.from || transaction.to) && (
<div className="margin-top-xs">
Expand Down

0 comments on commit 1a95a9e

Please sign in to comment.