@@ -13,52 +13,51 @@ DAS_API_ENDPOINTS.forEach((endpoint) => {
13
13
14
14
// When we search for an asset given its owner.
15
15
const assets = await umi . rpc . searchAssets ( {
16
- owner : publicKey ( 'DASPQfEAVcHp55eFmfstRduMT3dSfoTirFFsMHwUaWaz ' ) ,
16
+ owner : publicKey ( '9Qo4631XNdLYVUw1S1iBhDmu1DtcPwHqrg5ZjPbzUqGQ ' ) ,
17
17
compressed : true ,
18
- jsonUri :
19
- 'https://arweave.net/c9aGs5fOk7gD4wWnSvmzeqgtfxAGRgtI1jYzvl8-IVs/chiaki-violet-azure-common.json' ,
18
+ jsonUri : "https://example.com/my-nft.json"
20
19
} ) ;
21
20
22
21
// Then we expect to find an asset.
23
- t . true ( assets . items . length > 1 ) ;
22
+ t . true ( assets . items . length >= 1 ) ;
24
23
25
24
// Then we expect the following data.
26
25
t . like ( assets . items [ 0 ] , < DasApiAsset > {
27
26
interface : 'V1_NFT' ,
28
- id : 'GGRbPQhwmo3dXBkJSAjMFc1QYTKGBt8qc11tTp3LkEKA ' ,
27
+ id : 'DNzerLDcC5apcAQQ2Wx3qfRK1NPP6g5Bsg11fPpWkRtA ' ,
29
28
content : {
30
29
metadata : {
31
- name : 'Chiaki Azure 55 ' ,
30
+ name : 'My NFT ' ,
32
31
symbol : '' ,
33
32
} ,
34
33
} ,
35
34
authorities : [
36
35
{
37
- address : '6FpirDzk8dXDfSHWH7FAjKSvjtMPbTBYe34bRckeRN2u ' ,
36
+ address : '8dFibVsqyHR7FXAwMuvkLMj86Xa6TAg6X1NsmHbJHTio ' ,
38
37
scopes : [ 'full' ] ,
39
38
} ,
40
39
] ,
41
40
compression : {
42
41
eligible : false ,
43
42
compressed : true ,
44
- data_hash : '29BdgNWxNB1sinkfmWKFQi3zWXRpsotp2FKoZhoqVa9F ' ,
45
- creator_hash : 'FGAvkyrzeEgvGGMfmi6ztGpvybHMYAL9w82nx6wzLVqn ' ,
46
- asset_hash : 'FGWfA5v5SZnpe9r32NEvDyX9hLeVEoBf3GqEkHX6YK9w ' ,
47
- tree : 'J1imb8C8SPzofrtgCxkN4nsKwHevzxgvHGeYBKFEDEmE ' ,
43
+ data_hash : '2YDXnkcksCo3RZdVFJC8oq1CMQoYFgN6TMWnkffFrHAM ' ,
44
+ creator_hash : 'EKDHSGbrGztomDfuiV4iqiZ6LschDJPsFiXjZ83f92Md ' ,
45
+ asset_hash : '8KPK2EQ7g3edRv4au36fRNwFPcfAvP3HnH2VFqsBQje7 ' ,
46
+ tree : 'Hw2qE4TKe8rt3VGWupLEH7wZtTrbBAzuU7LWBXfhGNMJ ' ,
48
47
seq : 1 ,
49
48
leaf_id : 0 ,
50
49
} ,
51
50
grouping : [
52
51
{
53
52
group_key : 'collection' ,
54
- group_value : 'Dm1TRVw82roqpfqpzsFxSsWg6a4z3dku6ebVHSHuVo1c ' ,
53
+ group_value : '3KPARzW2CoGhFYMKbxjGuGQfF3w2o9shnnjKZmCHCjBU ' ,
55
54
} ,
56
55
] ,
57
56
royalty : {
58
57
royalty_model : 'creators' ,
59
58
target : null ,
60
- percent : 0.05 ,
61
- basis_points : 500 ,
59
+ percent : 0.055 ,
60
+ basis_points : 550 ,
62
61
primary_sale_happened : false ,
63
62
locked : false ,
64
63
} ,
@@ -71,7 +70,7 @@ DAS_API_ENDPOINTS.forEach((endpoint) => {
71
70
72
71
// When we search for assets given their collection.
73
72
const assets = await umi . rpc . searchAssets ( {
74
- grouping : [ 'collection' , 'Dm1TRVw82roqpfqpzsFxSsWg6a4z3dku6ebVHSHuVo1c ' ] ,
73
+ grouping : [ 'collection' , '3KPARzW2CoGhFYMKbxjGuGQfF3w2o9shnnjKZmCHCjBU ' ] ,
75
74
} ) ;
76
75
77
76
// Then we expect to find assets.
@@ -83,7 +82,7 @@ DAS_API_ENDPOINTS.forEach((endpoint) => {
83
82
grouping : [
84
83
{
85
84
group_key : 'collection' ,
86
- group_value : 'Dm1TRVw82roqpfqpzsFxSsWg6a4z3dku6ebVHSHuVo1c ' ,
85
+ group_value : '3KPARzW2CoGhFYMKbxjGuGQfF3w2o9shnnjKZmCHCjBU ' ,
87
86
} ,
88
87
] ,
89
88
} ) ;
@@ -96,7 +95,7 @@ DAS_API_ENDPOINTS.forEach((endpoint) => {
96
95
97
96
// When we search for assets with display options.
98
97
const assets = await umi . rpc . searchAssets ( {
99
- owner : publicKey ( 'DASPQfEAVcHp55eFmfstRduMT3dSfoTirFFsMHwUaWaz ' ) ,
98
+ owner : publicKey ( '3p1hnJ5ffeDamjAeBRReBdVfnef3jd19wBiTSLd3ikDE ' ) ,
100
99
displayOptions : {
101
100
showUnverifiedCollections : true ,
102
101
} ,
@@ -107,7 +106,7 @@ DAS_API_ENDPOINTS.forEach((endpoint) => {
107
106
108
107
// Find the specific asset
109
108
const specificAsset = assets . items . find (
110
- ( asset ) => asset . id === '8bFQbnBrzeiYQabEJ1ghy5T7uFpqFzPjUGsVi3SzSMHB '
109
+ ( asset ) => asset . id === '6gzjJWsqaPM37HyrTHxVCoysZiGA757ixwap4dY3pxh5 '
111
110
) ;
112
111
113
112
// Assert the asset exists and has group_definition
@@ -127,7 +126,7 @@ DAS_API_ENDPOINTS.forEach((endpoint) => {
127
126
128
127
// When we search for assets with display options.
129
128
const assets = await umi . rpc . searchAssets ( {
130
- owner : publicKey ( 'DASPQfEAVcHp55eFmfstRduMT3dSfoTirFFsMHwUaWaz ' ) ,
129
+ owner : publicKey ( '3p1hnJ5ffeDamjAeBRReBdVfnef3jd19wBiTSLd3ikDE ' ) ,
131
130
displayOptions : {
132
131
showUnverifiedCollections : false ,
133
132
} ,
@@ -138,12 +137,10 @@ DAS_API_ENDPOINTS.forEach((endpoint) => {
138
137
139
138
// But not the specific asset which is not a verified part of a collection
140
139
const specificAsset = assets . items . find (
141
- ( asset ) => asset . id === '8bFQbnBrzeiYQabEJ1ghy5T7uFpqFzPjUGsVi3SzSMHB '
140
+ ( asset ) => asset . id === '6gzjJWsqaPM37HyrTHxVCoysZiGA757ixwap4dY3pxh5 '
142
141
) ;
143
142
144
- t . assert (
145
- specificAsset === undefined ,
146
- 'Expected to not find the specific asset'
147
- ) ;
143
+ t . truthy ( specificAsset , 'Expected to find the specific asset' ) ;
144
+ t . is ( specificAsset ?. grouping . length , 0 , 'Expected grouping array to be empty' ) ;
148
145
} ) ;
149
146
} ) ;
0 commit comments