Skip to content

Commit

Permalink
Merge pull request #61 from ckb-cell/fix/symbol
Browse files Browse the repository at this point in the history
feat: use typeHash prefix as symbol when is null
  • Loading branch information
ahonn authored Aug 2, 2024
2 parents 05e65be + 672c3a5 commit 8acc78d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/modules/rgbpp/coin/coin.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ export class RgbppCoin {
transactionsCount: number;

public static from(xudt: CkbExplorer.XUDT): RgbppBaseCoin | null {
if (!xudt || !xudt.symbol) {
if (!xudt) {
return null;
}
return {
name: xudt.full_name,
description: xudt.description,
symbol: xudt.symbol,
symbol: xudt.symbol ?? xudt.type_hash.slice(0, 6),
decimal: toNumber(xudt.decimal),
icon: xudt.icon_file,
typeHash: xudt.type_hash,
Expand Down

0 comments on commit 8acc78d

Please sign in to comment.