Skip to content

Commit f97707a

Browse files
committed
feat: 🎸 add assetId in GET /assets/{asset} response
1 parent e2b1883 commit f97707a

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

‎src/assets/assets.controller.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ describe('AssetsController', () => {
9999

100100
const mockResult = {
101101
...mockAssetDetails,
102+
assetId: mockAsset.id,
102103
securityIdentifiers: mockIdentifiers,
103104
fundingRound: mockFundingRound,
104105
isFrozen: mockAssetIsFrozen,

‎src/assets/assets.util.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export async function createAssetDetailsModel(asset: Asset): Promise<AssetDetail
2323

2424
return new AssetDetailsModel({
2525
owner,
26+
assetId: asset.id,
2627
assetType,
2728
name,
2829
totalSupply,

‎src/assets/models/asset-balance.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { FromEntity } from '~/common/decorators/transformation';
88

99
export class AssetBalanceModel extends BalanceModel {
1010
@ApiProperty({
11-
description: 'Ticker of the Asset',
11+
description: 'The Asset ID',
1212
type: 'string',
13-
example: 'TICKER',
13+
example: '6468aa16-7b77-8fcd-9605-da785c4005a8',
1414
})
1515
@FromEntity()
1616
readonly asset: FungibleAsset;

‎src/assets/models/asset-details.model.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ export class AssetDetailsModel {
1919
@FromEntity()
2020
readonly owner: Identity;
2121

22+
@ApiProperty({
23+
description: 'The unique Asset ID',
24+
type: 'string',
25+
example: '6468aa16-7b77-8fcd-9605-da785c4005a8',
26+
})
27+
readonly assetId: string;
28+
2229
@ApiProperty({
2330
description: 'Type of the Asset',
2431
type: 'string',

0 commit comments

Comments
 (0)