Skip to content

Commit

Permalink
🔊 Store platform qs in mint API
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Feb 9, 2023
1 parent c82adc5 commit ffcc490
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/routes/likernft/mint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ router.post(
iscn_id: iscnId,
tx_hash: txHash,
class_id: inputClassId,
platform,
} = req.query;
if (!iscnId) throw new ValidationError('MISSING_ISCN_ID');
const iscnPrefix = getISCNPrefix(iscnId);
Expand Down Expand Up @@ -93,6 +94,7 @@ router.post(
...chainMetadata,
classId,
totalCount: nfts.length,
platform,
}, nfts);

res.json({
Expand All @@ -110,6 +112,7 @@ router.post(
sellerWallet,
apiWallet: LIKER_NFT_TARGET_ADDRESS,
uri,
platform,
};

publisher.publish(PUBSUB_TOPIC_MISC, req, {
Expand Down
3 changes: 3 additions & 0 deletions src/util/api/likernft/mint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export async function writeMintedNFTInfo(iscnPrefix, classData, nfts) {
totalCount,
uri = '',
metadata = {},
platform,
} = classData;
const currentBatch = 0;
const { price, count } = getNFTBatchInfo(currentBatch);
Expand All @@ -73,6 +74,7 @@ export async function writeMintedNFTInfo(iscnPrefix, classData, nfts) {
ownerWallet: sellerWallet,
processingCount: 0,
timestamp,
platform,
});
batch.create(iscnRef.collection('class').doc(classId), {
id: classId,
Expand All @@ -81,6 +83,7 @@ export async function writeMintedNFTInfo(iscnPrefix, classData, nfts) {
soldCount: 0,
creatorWallet: sellerWallet,
timestamp,
platform,
metadata: {
...otherData,
image: image || WNFT_DEFAULT_PATH, // TODO: replace with default NFT image
Expand Down

0 comments on commit ffcc490

Please sign in to comment.