Skip to content

Commit

Permalink
fix: include paymentRecoverySets when calling preparePurseKind()
Browse files Browse the repository at this point in the history
cleanerRecoverySet() asserts paymentRecoverySet !== undefined when
recoverSetState === noRecoverySets, so paymentLedger must provide it
when calling preparePurseKind().
  • Loading branch information
Chris-Hibbert committed Nov 7, 2023
1 parent aedaf46 commit 11dfdb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ERTP/src/paymentLedger.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export const preparePaymentLedger = (
withdrawInternal,
}),
recoverySetsState,
recoverySetsState === 'noRecoverySets' ? undefined : paymentRecoverySets,
paymentRecoverySets,
);

/** @type {Issuer<K>} */
Expand Down
4 changes: 2 additions & 2 deletions packages/ERTP/src/purse.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const EMPTY_COPY_SET = makeCopySet([]);
* withdrawInternal: any;
* }} purseMethods
* @param {RecoverySetsOption} recoverySetsState
* @param {WeakMapStore<Payment, SetStore<Payment>>} [paymentRecoverySets]
* @param {WeakMapStore<Payment, SetStore<Payment>>} paymentRecoverySets
*/
export const preparePurseKind = (
issuerBaggage,
Expand All @@ -35,7 +35,7 @@ export const preparePurseKind = (
PurseIKit,
purseMethods,
recoverySetsState,
paymentRecoverySets = undefined,
paymentRecoverySets,
) => {
const amountShape = brand.getAmountShape();

Expand Down

0 comments on commit 11dfdb5

Please sign in to comment.