Skip to content

Commit

Permalink
chore: add defense in depth input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
katelynsills committed Oct 26, 2021
1 parent 9699124 commit 364afca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ERTP/src/paymentLedger.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ export const makePaymentLedger = (
* @returns {Payment[]}
*/
const moveAssets = (payments, newPaymentBalances) => {
assertArray(payments, 'payments');
assertArray(newPaymentBalances, 'newPaymentBalances');

// There may be zero, one, or many payments as input to
// moveAssets. We want to protect against someone passing in
// what appears to be multiple payments that turn out to actually
Expand Down

0 comments on commit 364afca

Please sign in to comment.