Skip to content

Commit

Permalink
Merge pull request #1630 from nervosnetwork/develop
Browse files Browse the repository at this point in the history
Merge develop into testnet
  • Loading branch information
Keith-CY authored May 29, 2024
2 parents 1e00f3c + d9c1050 commit d0a0315
Show file tree
Hide file tree
Showing 13 changed files with 754 additions and 198 deletions.
15 changes: 13 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,16 @@
"leap_out_tip": "This RGB++ transaction is marked as \"L2 → L1\", indicating that the number of cells with RGB++ lock in the input exceeds the number of cells with RGB++ lock in the output.",
"view_in_btc_explorer": "View in Bitcoin Explorer",
"view-as-asset-items": "View Asset Distribution",
"view-as-merged-assets": "View Asset Amounts(CKB excluded)"
"view-as-merged-assets": "View Asset Amounts(CKB excluded)",
"block-height": "Block Height",
"out-point": "OutPoint",
"capacity": "Capacity(CKB)",
"type": "Type",
"amount": "Amount",
"detail": "Detail",
"asset": "Asset",
"view-asset": "View Asset",
"cell-info": "Cell Info"
},
"rgbpp": {
"transaction": {
Expand Down Expand Up @@ -895,7 +904,9 @@
},
"sort": {
"time": "Sort by time",
"capacity": "Sort by capacity"
"capacity": "Sort by capacity",
"card": "Show as card view",
"list": "Show as list view"
},
"decoder": {
"view-data-as": "View data as",
Expand Down
15 changes: 13 additions & 2 deletions src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,16 @@
"leap_out_tip": "本笔 RGB++ 交易被标记为\"L2 → L1\",即存在 RGB++ 资产转化为一般 CKB 资产。",
"view_in_btc_explorer": "在 Bitcoin 浏览器查看",
"view-as-asset-items": "查看资产分布",
"view-as-merged-assets": "查看资产合计(不含 CKB)"
"view-as-merged-assets": "查看资产合计(不含 CKB)",
"block-height": "区块高度",
"out-point": "OutPoint",
"capacity": "Capacity",
"type": "类型",
"amount": "数量",
"detail": "详情",
"asset": "资产",
"view-asset": "查看资产",
"cell-info": "Cell详情"
},
"rgbpp": {
"transaction": {
Expand Down Expand Up @@ -896,7 +905,9 @@
},
"sort": {
"time": "按时间排序",
"capacity": "按 Capacity 排序"
"capacity": "按 Capacity 排序",
"card": "按卡片样式展示",
"list": "按列表样式展示"
},
"decoder": {
"view-data-as": "选择解码格式",
Expand Down
47 changes: 3 additions & 44 deletions src/pages/Address/AddressComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,8 @@ import { Address, UDTAccount } from '../../models/Address'
import { Card, CardCellInfo, CardCellsLayout } from '../../components/Card'
import { CardHeader } from '../../components/Card/CardHeader'
import Cells from './Cells'
import {
AddressCoTAComp,
AddressOmigaInscriptionComp,
AddressMNFTComp,
AddressSporeComp,
AddressSudtComp,
AddressXudtComp,
AddressNRC721Comp,
} from './AddressAssetComp'
import DefinedTokens from './DefinedTokens'
import { AddressOmigaInscriptionComp } from './AddressAssetComp'

enum AssetInfo {
UDT = 1,
Expand Down Expand Up @@ -255,41 +248,7 @@ export const AddressOverviewCard: FC<{ address: Address }> = ({ address }) => {
key={AssetInfo.UDT}
>
<div className={styles.assetCardList}>
{udts.map(udt => {
switch (udt.udtType) {
case 'xudt':
return <AddressXudtComp account={udt} key={udt.symbol + udt.udtType + udt.amount} />

case 'sudt':
return <AddressSudtComp account={udt} key={udt.symbol + udt.udtType + udt.amount} />

case 'spore_cell':
return <AddressSporeComp account={udt} key={udt.symbol + udt.udtType + udt.amount} />

case 'm_nft_token':
return <AddressMNFTComp account={udt} key={udt.symbol + udt.udtType + udt.amount} />

case 'nrc_721_token':
return <AddressNRC721Comp account={udt} key={udt.symbol + udt.udtType + udt.amount} />

default:
return null
}
})}
{cotaList?.map(cota => (
<AddressCoTAComp
account={{
udtType: 'cota',
symbol: cota.collection.name,
udtIconFile: cota.collection.icon_url ?? '',
cota: {
cotaId: cota.collection.id,
tokenId: Number(cota.token_id),
},
}}
key={cota.collection.id + cota.token_id}
/>
)) ?? null}
<DefinedTokens udts={udts} cotaList={cotaList} />
</div>
</AddressAssetsTabPane>
)}
Expand Down
Loading

0 comments on commit d0a0315

Please sign in to comment.