Skip to content

Commit

Permalink
fix(container/upload): fixed providers list
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkru69 committed Sep 24, 2024
1 parent a649302 commit b4b60b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/cli/src/commands/container/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,15 @@ export default class ContainerUpload extends BaseCommand {
const providersCount = await providerContract.scGet({ abi: abis.provider, functionName: 'totalSupply', args: [] });

const providers = await Promise.all(
[...Array(providersCount)].map(async (_, index) => {
Array.from({ length: Number(providersCount) }, (async (_, index) => {
const tokenIdBigint = await providerContract.scGet({ abi: abis.provider, functionName: 'tokenByIndex', args: [BigInt(index)] });

const tokenId = String(tokenIdBigint);

const name = await providerContract.scGet({ abi: abis.provider, functionName: 'name', args: [tokenIdBigint] });

return { name, tokenId };
}),
})),
);

const { providerId }: { providerId: number } = await prompt({
Expand Down

0 comments on commit b4b60b5

Please sign in to comment.