Skip to content

Commit

Permalink
fix: pagination on marketplace ids
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Mar 8, 2024
1 parent 48d3dad commit c901e16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ const getTokenizedUnitByAssetId = async (assetId) => {
);
}

return response.body;
return response?.body?.data || [];
} catch (error) {
logger.error(`Could not get tokenized unit by asset id: ${error.message}`);

Expand Down
2 changes: 1 addition & 1 deletion src/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const parseDetokFile = async (req, res) => {
const unitToBeDetokenizedResponse =
await registry.getTokenizedUnitByAssetId(assetId);

let unitToBeDetokenized = JSON.parse(unitToBeDetokenizedResponse);
let unitToBeDetokenized = unitToBeDetokenizedResponse;
if (unitToBeDetokenized.length) {
unitToBeDetokenized = unitToBeDetokenized[0];
}
Expand Down

0 comments on commit c901e16

Please sign in to comment.