Skip to content

Commit

Permalink
chore: expose token metadata
Browse files Browse the repository at this point in the history
chore: expose token metadata

chore: expose token metadata

chore: expose token metadata
  • Loading branch information
vladimirvolek committed Jun 10, 2024
1 parent c2da28f commit 2def889
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/types/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type Transactions = TxIdsToTransactionsResponse[];
export interface AssetBalance extends Balance {
fingerprint?: string; // lovelace has no fingerprint
decimals: number;
ticker?: string | null;
name?: string | null;
}

export interface AccountInfo {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export const transformAsset = (
return {
...token,
fingerprint: parseAsset(token.unit).fingerprint,
ticker: tokenRegistryMetadata?.metadata?.ticker ?? null,
name: tokenRegistryMetadata?.metadata?.name ?? null,
decimals,
};
};
Expand Down

0 comments on commit 2def889

Please sign in to comment.