Skip to content

Commit

Permalink
Merge branch 'develop' into testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Mar 12, 2024
2 parents 18949a6 + a9c8027 commit c0a72ff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/pages/Address/Cells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ const Cells: FC<{ address: string; count: number }> = ({ address, count }) => {
assetAmount = '-'
break
}
case 'm_nft': {
icon = SUDTTokenIcon
assetName = cell.extraInfo.className
assetAmount = `#${parseInt(cell.extraInfo.tokenId, 16)}`
break
}
default: {
icon = SUDTTokenIcon
assetName = 'UNKNOWN'
Expand All @@ -138,7 +144,7 @@ const Cells: FC<{ address: string; count: number }> = ({ address, count }) => {
</h5>
<div className={styles.content}>
{icon ? <img src={icon} alt={assetName ?? 'sudt'} width="40" height="40" /> : null}
<div>
<div className={styles.fields}>
<div className={styles.assetName}>{assetName}</div>
<div>{assetAmount}</div>
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/pages/Address/cells.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
.content {
padding: 8px;
display: flex;
line-height: 1;

img {
margin-right: 8px;
Expand All @@ -55,6 +56,12 @@
.assetName {
color: #666;
}

.fields {
display: flex;
flex-direction: column;
justify-content: space-around;
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/services/ExplorerService/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ export const apiFetcher = {
published: boolean
displayName: string
uan: string
type: 'ckb' | 'udt' | 'nrc_721'
type: 'ckb' | 'udt' | 'nrc_721' | 'm_nft'
className: string
tokenId: string
}
}>(`address_live_cells/${address}`, {
params: {
Expand Down

0 comments on commit c0a72ff

Please sign in to comment.