Skip to content

Commit

Permalink
fix: update Create tag token
Browse files Browse the repository at this point in the history
  • Loading branch information
tiendn committed Mar 17, 2023
1 parent 4ed795b commit 4bbbdd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utils/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,26 @@ export const evmConvertTokenTransferToTransactionRow = (
): TransactionRowProps[] => {
const rows: TransactionRowProps[] = []
for (let item of items) {
const isCreate = item.fromAddress === ZERO_ADDRESS && item.toAddress === ZERO_ADDRESS
const isMint = item.fromAddress === ZERO_ADDRESS
const isBurn = item.toAddress === ZERO_ADDRESS
const labelStatus = (isMint && 'Mint') || (isBurn && 'Burn')
const labelStatus = (isCreate && 'Create') || (isMint && 'Mint') || (isBurn && 'Burn')

const isNft = isERC721(item.tokenType)
const value = isNft ? '1' : formatUnits(item.amount || '0', item.decimals)

rows.push({
style: 'inject',
blockNumber: blockHeight,
updatedAt: blockTime,
value: isNft ? '1' : formatUnits(item.amount || '0', item.decimals),
value,
valueCurrency: item.tokenSymbol?.toUpperCase(),
hash: hash,
status,
from: item.fromAddress,
fromName: item.fromAddressName,
to: item.toAddress,
toName: item.toAddressName,
labelStatus,
type: 'MsgEthereumTx'
})
Expand Down
1 change: 1 addition & 0 deletions views/transactions/TransactionRowContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export default function TransactionRowContent({
</Typography.LinkText>
</>
)}
{(fromName || toName) && <br />}
{(to || contractAddress) && (
<>
<span
Expand Down

0 comments on commit 4bbbdd8

Please sign in to comment.