Skip to content

Commit 8fe9ec2

Browse files
fix incorrect merge
1 parent 6fc3f81 commit 8fe9ec2

File tree

1 file changed

+10
-57
lines changed

1 file changed

+10
-57
lines changed

clients/js/src/decorator.ts

Lines changed: 10 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -289,61 +289,14 @@ export const createDasApiDecorator = (
289289
input.sort_direction ?? null,
290290
]
291291
);
292+
if (!signatures) {
293+
const identifier =
294+
'assetId' in input
295+
? `asset: ${input.assetId}`
296+
: `tree: ${input.tree}, leaf_index: ${input.leaf_index}`;
297+
throw new DasApiError(`No signatures found for ${identifier}`);
298+
}
299+
return signatures;
292300
}
293-
const assetList = await rpc.call<DasApiAssetList | null>('searchAssets', [
294-
input.negate ?? null,
295-
input.conditionType ?? null,
296-
input.interface ?? null,
297-
input.owner ?? null,
298-
input.ownerType ?? null,
299-
input.creator ?? null,
300-
input.creatorVerified ?? null,
301-
input.authority ?? null,
302-
input.grouping ?? null,
303-
input.delegate ?? null,
304-
input.frozen ?? null,
305-
input.supply ?? null,
306-
input.supplyMint ?? null,
307-
input.compressed ?? null,
308-
input.compressible ?? null,
309-
input.royaltyModel ?? null,
310-
input.royaltyTarget ?? null,
311-
input.royaltyAmount ?? null,
312-
input.burnt ?? null,
313-
input.sortBy ?? null,
314-
input.limit ?? null,
315-
input.page ?? 1,
316-
input.before ?? null,
317-
input.after ?? null,
318-
input.jsonUri ?? null,
319-
]);
320-
if (!assetList) {
321-
throw new DasApiError('No assets found for the given search criteria');
322-
}
323-
return assetList;
324-
},
325-
getAssetSignatures: async (input: GetAssetSignaturesRpcInput) => {
326-
const signatures = await rpc.call<GetAssetSignaturesRpcResponse | null>(
327-
'getAssetSignaturesV2',
328-
[
329-
'assetId' in input ? input.assetId : null,
330-
input.limit ?? null,
331-
input.page ?? null,
332-
input.before ?? null,
333-
input.after ?? null,
334-
'tree' in input ? input.tree : null,
335-
'tree' in input ? input.leaf_index : null,
336-
input.cursor ?? null,
337-
input.sort_direction ?? null,
338-
]
339-
);
340-
if (!signatures) {
341-
const identifier =
342-
'assetId' in input
343-
? `asset: ${input.assetId}`
344-
: `tree: ${input.tree}, leaf_index: ${input.leaf_index}`;
345-
throw new DasApiError(`No signatures found for ${identifier}`);
346-
}
347-
return signatures;
348-
},
349-
});
301+
};
302+
};

0 commit comments

Comments
 (0)