Skip to content

Commit

Permalink
fix handling of empty allowed pools list
Browse files Browse the repository at this point in the history
  • Loading branch information
danoctavian committed Jul 25, 2023
1 parent 28fb978 commit ccbb54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/products/generate-setProducts-tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const main = async (provider, productsDataFilePath) => {
capacityReductionRatio: parseInt(data['Capacity Reduction Ratio']),
useFixedPrice: data['Use fixed price'].trim() === 'TRUE',
},
allowedPools: data['Allowed Pools'].split(',').map(parseInt),
allowedPools: data['Allowed Pools'].split(',').map(v => v.trim()).filter(v => v.length > 0).map(parseInt),

Check failure on line 73 in scripts/products/generate-setProducts-tx.js

View workflow job for this annotation

GitHub Actions / lint

Replace `.split(',').map(v·=>·v.trim()).filter(v·=>·v.length·>·0)` with `⏎········.split(',')⏎········.map(v·=>·v.trim())⏎········.filter(v·=>·v.length·>·0)⏎········`
};

return productParams;
Expand Down

0 comments on commit ccbb54c

Please sign in to comment.