metaplex-foundation / metaplex-program-library

Smart contracts maintained by the Metaplex team
Other
591 stars 516 forks source link

[Bug]: candy machine v2's verify_assets CLI miscounts images in current directory #364

Closed sfdz closed 2 years ago

sfdz commented 2 years ago

Which package is this bug report for?

candy-machine

Issue description

The verify_assets command has an off-by-one error when it counts the number of images in the current directory.

Steps to reproduce:

Relevant log output

started at: 1649430876934
/Users/sfdz/Documents/metaplex/js/packages/cli/src/commands/verifyTokenMetadata/index.ts:27
    throw new Error(
          ^
Error: number of img files (101) is different than the number of json files (100)
    at verifyAssets (/Users/sfdz/Documents/metaplex/js/packages/cli/src/commands/verifyTokenMetadata/index.ts:27:11)
    at verifyTokenMetadata (/Users/sfdz/Documents/metaplex/js/packages/cli/src/commands/verifyTokenMetadata/index.ts:166:15)
    at Command.<anonymous> (/Users/sfdz/Documents/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts:331:24)
    at Command.listener [as _actionHandler] (/Users/sfdz/Documents/metaplex/js/packages/cli/node_modules/commander/lib/command.js:488:17)
    at /Users/sfdz/Documents/metaplex/js/packages/cli/node_modules/commander/lib/command.js:1227:65
    at Command._chainOrCall (/Users/sfdz/Documents/metaplex/js/packages/cli/node_modules/commander/lib/command.js:1144:12)
    at Command._parseCommand (/Users/sfdz/Documents/metaplex/js/packages/cli/node_modules/commander/lib/command.js:1227:27)
    at Command._dispatchSubcommand (/Users/sfdz/Documents/metaplex/js/packages/cli/node_modules/commander/lib/command.js:1050:25)
    at Command._parseCommand (/Users/sfdz/Documents/metaplex/js/packages/cli/node_modules/commander/lib/command.js:1193:19)
    at Command.parse (/Users/sfdz/Documents/metaplex/js/packages/cli/node_modules/commander/lib/command.js:897:10)

Priority this issue should have

Low (slightly annoying)

sfdz commented 2 years ago

The CLI isn't contained in this repo