{"record":{"id":"68ac9c0b1c562525","repo":"FuelLabs/fuels-ts","slug":"invalid-input-parameters-68ac9c","errorCode":"INVALID_INPUT_PARAMETERS","errorMessage":"Number of wallets must be greater than zero.","messagePattern":"Number of wallets must be greater than zero\\.","errorType":"validation","errorClass":"FuelError","httpStatus":null,"severity":"warning","filePath":"packages/account/src/test-utils/wallet-config.ts","lineNumber":151,"sourceCode":"            });\n          }\n        });\n      });\n\n    return coins;\n  }\n\n  private static validate({\n    count: wallets,\n    assets,\n    coinsPerAsset,\n    amountPerCoin,\n  }: WalletsConfigOptions) {\n    if (\n      (Array.isArray(wallets) && wallets.length === 0) ||\n      (typeof wallets === 'number' && wallets <= 0)\n    ) {\n      throw new FuelError(\n        FuelError.CODES.INVALID_INPUT_PARAMETERS,\n        'Number of wallets must be greater than zero.'\n      );\n    }\n    if (\n      (Array.isArray(assets) && assets.length === 0) ||\n      (typeof assets === 'number' && assets <= 0)\n    ) {\n      throw new FuelError(\n        FuelError.CODES.INVALID_INPUT_PARAMETERS,\n        'Number of assets per wallet must be greater than zero.'\n      );\n    }\n    if (coinsPerAsset <= 0) {\n      throw new FuelError(\n        FuelError.CODES.INVALID_INPUT_PARAMETERS,\n        'Number of coins per asset must be greater than zero.'\n      );","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/account/src/test-utils/wallet-config.ts#L133-L169","documentation":"Thrown by `WalletsConfig.validate()` (test-utils) when the `count` (wallets) option is an empty array or a number <= 0. The test wallet launcher needs at least one wallet to seed, so it rejects a non-positive count before generating any test fixtures.","triggerScenarios":"Calling `launchTestNode` (or directly constructing a `WalletsConfig`) with `wallets: 0`, `wallets: -1`, or `wallets: []`. The validate check at wallet-config.ts:147 fires.","commonSituations":"Parameterizing a test setup from a config where the wallet count defaulted to 0; refactoring a test suite and forgetting to set the count; dynamically computing wallet count from a list that came back empty.","solutions":["Set `wallets` to a positive number or a non-empty array in your WalletsConfig.","Guard the caller to skip setup entirely when the computed count is 0.","Add an assertion in your test bootstrap before launching the node."],"exampleFix":"// before\nawait launchTestNode({ walletsConfig: { count: 0, coinsPerAsset: 1, amountPerCoin: 100 } });\n// after\nawait launchTestNode({ walletsConfig: { count: 2, coinsPerAsset: 1, amountPerCoin: 100 } });","handlingStrategy":"validation","validationCode":"function walletCount(v: number | unknown[]): number { return Array.isArray(v) ? v.length : v; }\nif (walletCount(config.count) <= 0) throw new Error('wallets must be > 0');","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Set count to a positive number or non-empty array.","Skip test setup entirely when computed count is 0.","Assert bootstrap config before launchTestNode."],"tags":["test-utils","config","validation","wallet"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}