Skip to content

Commit

Permalink
Merge pull request #64 from permaweb/permaweb-libs
Browse files Browse the repository at this point in the history
pass custom supply to asset creation
  • Loading branch information
NickJ202 authored Jan 29, 2025
2 parents 0d2b8a5 + fdb1429 commit b3cc38e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/views/Upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export default function Upload() {
const assetName = element.title || stripFileExtension(element.file.name);
const assetDescription =
element.description || uploadReducer.data.description || stripFileExtension(element.file.name);
const assetSupply = uploadReducer.data.useFractionalTokens ? Number(uploadReducer.data.contentTokens) : 1;

try {
const buffer: any = await fileToBuffer(element.file);
Expand All @@ -216,6 +217,7 @@ export default function Upload() {
data: buffer,
contentType: contentType,
assetType: contentType,
supply: assetSupply,
};

if (collectionId) asset.metadata = { collectionId };
Expand Down

0 comments on commit b3cc38e

Please sign in to comment.