From 35e092975715e174ca17e3b8374c391a110e13a7 Mon Sep 17 00:00:00 2001 From: Juli Milloch Date: Wed, 9 Aug 2023 17:53:43 +0200 Subject: [PATCH] chore: update comments --- src/resolvers.ts | 10 +++++----- test/urn.spec.ts | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/resolvers.ts b/src/resolvers.ts index 38cb473..4003b15 100644 --- a/src/resolvers.ts +++ b/src/resolvers.ts @@ -28,27 +28,27 @@ export const resolvers: RouteMap = { 'decentraland:entity:{cid}': resolveEntityV3, // collections v1 asset (by contract) 'decentraland:{network}:collections-v1:{contract(0x[a-fA-F0-9]+)}:{name}': resolveCollectionV1Asset, - // collections v1 asset (by contract) tokenId + // collections v1 item (by asset name and token id) 'decentraland:{network}:collections-v1:{contract(0x[a-fA-F0-9]+)}:{name}:{tokenId([0-9]+)}': resolveCollectionV1AssetTokenId, // collections v1 asset (by name) 'decentraland:{network}:collections-v1:{collectionName}:{name}': resolveCollectionV1AssetByCollectionName, - // collections v1 asset (by name) tokenId + // collections v1 item (by asset name and token id) 'decentraland:{network}:collections-v1:{collectionName}:{name}:{tokenId([0-9]+)}': resolveCollectionV1AssetByCollectionNameTokenId, // collections v2 asset (hex) 'decentraland:{network}:collections-v2:{contract(0x[a-fA-F0-9]+)}:{id(0x[a-fA-F0-9]+)}': resolveCollectionV2Asset, - // collections v2 asset (hex) tokenId + // collections v2 item (by collection hex and token id) 'decentraland:{network}:collections-v2:{contract(0x[a-fA-F0-9]+)}:{id(0x[a-fA-F0-9]+)}:{tokenId([0-9]+)}': resolveCollectionV2AssetTokenId, // collections v2 asset (id) 'decentraland:{network}:collections-v2:{contract(0x[a-fA-F0-9]+)}:{id([0-9]+)}': resolveCollectionV2Asset, - // collections v2 asset (id) tokenId + // collections v2 item (by collection asset and token id) 'decentraland:{network}:collections-v2:{contract(0x[a-fA-F0-9]+)}:{id([0-9]+)}:{tokenId([0-9]+)}': resolveCollectionV2AssetTokenId, // collections v1 (by contract) 'decentraland:{network}:collections-v1:{contract(0x[a-fA-F0-9]+)}': resolveCollectionV1, - // collections v1 (by name) itemId + // collections v1 (by name) 'decentraland:{network}:collections-v1:{collectionName}': resolveCollectionV1ByCollectionName, // collections v2 'decentraland:{network}:collections-v2:{contract(0x[a-fA-F0-9]+)}': resolveCollectionV2, diff --git a/test/urn.spec.ts b/test/urn.spec.ts index 3099f47..4b05d08 100644 --- a/test/urn.spec.ts +++ b/test/urn.spec.ts @@ -152,7 +152,7 @@ describe('Basic use cases', function () { }) }) - it('test collection asset v2 with tokenId', async () => { + it('test collection v2 item with tokenId', async () => { const r = await parseUrn( 'urn:decentraland:ethereum:collections-v2:0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d:0:123' ) @@ -166,7 +166,7 @@ describe('Basic use cases', function () { }) }) - it('test collection asset v1 with tokenId', async () => { + it('test collection v1 item with tokenId', async () => { const r = await parseUrn( 'urn:decentraland:ethereum:collections-v1:0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d:test_name:456' ) @@ -180,7 +180,7 @@ describe('Basic use cases', function () { }) }) - it('test collection v1 asset (with name) and tokenId', async () => { + it('test collection v1 item with collection name and tokenId', async () => { const r = await parseUrn('urn:decentraland:ethereum:collections-v1:community_contest:cw_bell_attendant_hat:789') expect(r).toMatchObject({ type: 'blockchain-collection-v1-item',